mirror of https://github.com/OpenMW/openmw.git
hello world.
parent
a1e48b0feb
commit
4ea6530772
@ -1,16 +1,9 @@
|
|||||||
project(resources)
|
project(resources)
|
||||||
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/water/caustic_0.png "${OpenMW_BINARY_DIR}/resources/water/caustic_0.png" COPYONLY)
|
copy_all_files(${CMAKE_CURRENT_SOURCE_DIR}/water/* "${OpenMW_BINARY_DIR}/resources/water/")
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/water/underwater.cg "${OpenMW_BINARY_DIR}/resources/water/underwater.cg" COPYONLY)
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/water/perlinvolume.dds "${OpenMW_BINARY_DIR}/resources/water/perlinvolume.dds" COPYONLY)
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/water/water.compositor "${OpenMW_BINARY_DIR}/resources/water/water.compositor" COPYONLY)
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/water/water.material "${OpenMW_BINARY_DIR}/resources/water/water.material" COPYONLY)
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/water/WaterNormal2.tga "${OpenMW_BINARY_DIR}/resources/water/WaterNormal2.tga" COPYONLY)
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/water/water.cg "${OpenMW_BINARY_DIR}/resources/water/water.cg" COPYONLY)
|
|
||||||
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/gbuffer/gbuffer.cg "${OpenMW_BINARY_DIR}/resources/gbuffer/gbuffer.cg" COPYONLY)
|
copy_all_files(${CMAKE_CURRENT_SOURCE_DIR}/gbuffer/* "${OpenMW_BINARY_DIR}/resources/gbuffer/")
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/gbuffer/gbuffer.material "${OpenMW_BINARY_DIR}/resources/gbuffer/gbuffer.material" COPYONLY)
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/gbuffer/gbuffer.compositor "${OpenMW_BINARY_DIR}/resources/gbuffer/gbuffer.compositor" COPYONLY)
|
|
||||||
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/shadows/depthshadowcaster.material "${OpenMW_BINARY_DIR}/resources/shadows/depthshadowcaster.material" COPYONLY)
|
copy_all_files(${CMAKE_CURRENT_SOURCE_DIR}/shadows/* "${OpenMW_BINARY_DIR}/resources/shadows/")
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/shadows/depthshadowcaster.cg "${OpenMW_BINARY_DIR}/resources/shadows/depthshadowcaster.cg" COPYONLY)
|
|
||||||
|
copy_all_files(${CMAKE_CURRENT_SOURCE_DIR}/materials/* "${OpenMW_BINARY_DIR}/resources/materials/")
|
||||||
|
@ -0,0 +1,96 @@
|
|||||||
|
#if SH_HLSL == 1 || SH_CG == 1
|
||||||
|
|
||||||
|
#define shTexture2D sampler2D
|
||||||
|
#define shSample(tex, coord) tex2D(tex, coord)
|
||||||
|
#define shLerp(a, b, t) lerp(a, b, t)
|
||||||
|
#define shSaturate(a) saturate(a)
|
||||||
|
|
||||||
|
#define shSampler2D(name) , uniform sampler2D name : register(s@shCounter(0)) @shUseSampler(name)
|
||||||
|
|
||||||
|
#define shMatrixMult(m, v) mul(m, v)
|
||||||
|
|
||||||
|
#define shUniform(s) , uniform s
|
||||||
|
|
||||||
|
#define shInput(type, name) , in type name : TEXCOORD@shCounter(1)
|
||||||
|
#define shOutput(type, name) , out type name : TEXCOORD@shCounter(2)
|
||||||
|
|
||||||
|
#ifdef SH_VERTEX_SHADER
|
||||||
|
|
||||||
|
#define shOutputPosition oPosition
|
||||||
|
#define shInputPosition iPosition
|
||||||
|
|
||||||
|
|
||||||
|
#define SH_BEGIN_PROGRAM \
|
||||||
|
void main( \
|
||||||
|
float4 iPosition : POSITION \
|
||||||
|
, out float4 oPosition : POSITION
|
||||||
|
|
||||||
|
#define SH_START_PROGRAM \
|
||||||
|
) \
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SH_FRAGMENT_SHADER
|
||||||
|
|
||||||
|
#define shOutputColor oColor
|
||||||
|
|
||||||
|
#define SH_BEGIN_PROGRAM \
|
||||||
|
void main( \
|
||||||
|
out float4 oColor : COLOR
|
||||||
|
|
||||||
|
#define SH_START_PROGRAM \
|
||||||
|
) \
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if SH_GLSL == 1
|
||||||
|
@shGlslVersion(420)
|
||||||
|
|
||||||
|
#define float2 vec2
|
||||||
|
#define float3 vec3
|
||||||
|
#define float4 vec4
|
||||||
|
#define int2 ivec2
|
||||||
|
#define int3 ivec3
|
||||||
|
#define int4 ivec4
|
||||||
|
#define shTexture2D sampler2D
|
||||||
|
#define shSample(tex, coord) texture(tex, coord)
|
||||||
|
#define shLerp(a, b, t) mix(a, b, t)
|
||||||
|
#define shSaturate(a) clamp(a, 0.0, 1.0)
|
||||||
|
|
||||||
|
#define shUniform(s) uniform s;
|
||||||
|
|
||||||
|
#define shSampler2D(name) uniform sampler2D name; @shUseSampler(name)
|
||||||
|
|
||||||
|
#define shMatrixMult(m, v) m * v
|
||||||
|
|
||||||
|
#define shInputPosition vertex
|
||||||
|
#define shOutputPosition gl_Position
|
||||||
|
#define shOutputColor oColor
|
||||||
|
|
||||||
|
#define float4x4 mat4
|
||||||
|
|
||||||
|
#define shInput(type, name) in type name;
|
||||||
|
#define shOutput(type, name) out type name;
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef SH_VERTEX_SHADER
|
||||||
|
|
||||||
|
#define SH_BEGIN_PROGRAM \
|
||||||
|
in float4 shInputPosition;
|
||||||
|
#define SH_START_PROGRAM \
|
||||||
|
void main(void)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SH_FRAGMENT_SHADER
|
||||||
|
|
||||||
|
#define SH_BEGIN_PROGRAM \
|
||||||
|
out float4 oColor;
|
||||||
|
#define SH_START_PROGRAM \
|
||||||
|
void main(void)
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
@ -0,0 +1,29 @@
|
|||||||
|
material openmw_objects_base
|
||||||
|
{
|
||||||
|
diffuse 1.0 1.0 1.0 1.0
|
||||||
|
specular 0.4 0.4 0.4 32
|
||||||
|
ambient 1.0 1.0 1.0
|
||||||
|
emissive 0.0 0.0 0.0
|
||||||
|
has_vertex_colour false
|
||||||
|
diffuseMap black.png
|
||||||
|
|
||||||
|
pass
|
||||||
|
{
|
||||||
|
vertex_program openmw_objects_vertex
|
||||||
|
fragment_program openmw_objects_fragment
|
||||||
|
|
||||||
|
diffuse $diffuse
|
||||||
|
specular $specular
|
||||||
|
ambient $ambient
|
||||||
|
emissive $emissive
|
||||||
|
|
||||||
|
ffp_vertex_colour_ambient $has_vertex_colour
|
||||||
|
has_vertex_colour $has_vertex_colour
|
||||||
|
|
||||||
|
texture_unit diffuseMap
|
||||||
|
{
|
||||||
|
texture $diffuseMap
|
||||||
|
create_in_ffp true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
#include "core.h"
|
||||||
|
|
||||||
|
#ifdef SH_VERTEX_SHADER
|
||||||
|
|
||||||
|
SH_BEGIN_PROGRAM
|
||||||
|
shUniform(float4x4 wvp) @shAutoConstant(wvp, worldviewproj_matrix)
|
||||||
|
shInput(float2, uv0)
|
||||||
|
shOutput(float2, UV)
|
||||||
|
SH_START_PROGRAM
|
||||||
|
{
|
||||||
|
shOutputPosition = shMatrixMult(wvp, shInputPosition);
|
||||||
|
UV = uv0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
SH_BEGIN_PROGRAM
|
||||||
|
shSampler2D(diffuseMap)
|
||||||
|
shInput(float2, UV)
|
||||||
|
|
||||||
|
SH_START_PROGRAM
|
||||||
|
{
|
||||||
|
// shOutputColor = float4(1.0, 0.0, 0.0, 1.0);
|
||||||
|
shOutputColor = shSample(diffuseMap, UV);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,15 @@
|
|||||||
|
shader_set openmw_objects_vertex
|
||||||
|
{
|
||||||
|
source objects.shader
|
||||||
|
type vertex
|
||||||
|
profiles_cg vs_2_0 arbvp1
|
||||||
|
profiles_hlsl vs_2_0
|
||||||
|
}
|
||||||
|
|
||||||
|
shader_set openmw_objects_fragment
|
||||||
|
{
|
||||||
|
source objects.shader
|
||||||
|
type fragment
|
||||||
|
profiles_cg ps_2_x ps_2_0 ps arbfp1
|
||||||
|
profiles_hlsl ps_2_0
|
||||||
|
}
|
@ -1,68 +1,6 @@
|
|||||||
# Minimal MyGUI build system for OpenMW
|
|
||||||
|
|
||||||
# Copy resource files into the build directory
|
# Copy resource files into the build directory
|
||||||
set(SDIR ${CMAKE_CURRENT_SOURCE_DIR})
|
set(SDIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
set(DDIR ${OpenMW_BINARY_DIR}/resources/mygui)
|
set(DDIR ${OpenMW_BINARY_DIR}/resources/mygui)
|
||||||
|
|
||||||
configure_file("${SDIR}/bigbars.png" "${DDIR}/bigbars.png" COPYONLY)
|
copy_all_files(${SDIR}/* ${DDIR})
|
||||||
configure_file("${SDIR}/black.png" "${DDIR}/black.png" COPYONLY)
|
|
||||||
configure_file("${SDIR}/core.skin" "${DDIR}/core.skin" COPYONLY)
|
|
||||||
configure_file("${SDIR}/core.xml" "${DDIR}/core.xml" COPYONLY)
|
|
||||||
configure_file("${SDIR}/mwgui.png" "${DDIR}/mwgui.png" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_resources.xml" "${DDIR}/openmw_resources.xml" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_settings.xml" "${DDIR}/openmw_settings.xml" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_box.skin.xml" "${DDIR}/openmw_box.skin.xml" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_button.skin.xml" "${DDIR}/openmw_button.skin.xml" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_list.skin.xml" "${DDIR}/openmw_list.skin.xml" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_edit.skin.xml" "${DDIR}/openmw_edit.skin.xml" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_console.layout" "${DDIR}/openmw_console.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_console.skin.xml" "${DDIR}/openmw_console.skin.xml" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw.font.xml" "${DDIR}/openmw.font.xml" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_hud_box.skin.xml" "${DDIR}/openmw_hud_box.skin.xml" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_hud_energybar.skin.xml" "${DDIR}/openmw_hud_energybar.skin.xml" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_hud.layout" "${DDIR}/openmw_hud.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_text_input.layout" "${DDIR}/openmw_text_input.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_infobox.layout" "${DDIR}/openmw_infobox.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_chargen_race.layout" "${DDIR}/openmw_chargen_race.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_chargen_class.layout" "${DDIR}/openmw_chargen_class.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_chargen_generate_class_result.layout" "${DDIR}/openmw_chargen_generate_class_result.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_chargen_create_class.layout" "${DDIR}/openmw_chargen_create_class.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_chargen_select_specialization.layout" "${DDIR}/openmw_chargen_select_specialization.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_chargen_select_attribute.layout" "${DDIR}/openmw_chargen_select_attribute.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_chargen_select_skill.layout" "${DDIR}/openmw_chargen_select_skill.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_chargen_class_description.layout" "${DDIR}/openmw_chargen_class_description.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_chargen_birth.layout" "${DDIR}/openmw_chargen_birth.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_chargen_review.layout" "${DDIR}/openmw_chargen_review.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_dialogue_window.layout" "${DDIR}/openmw_dialogue_window.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_dialogue_window_skin.xml" "${DDIR}/openmw_dialogue_window_skin.xml" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_inventory_window.layout" "${DDIR}/openmw_inventory_window.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_container_window.layout" "${DDIR}/openmw_container_window.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_layers.xml" "${DDIR}/openmw_layers.xml" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_mainmenu.layout" "${DDIR}/openmw_mainmenu.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_mainmenu_skin.xml" "${DDIR}/openmw_mainmenu_skin.xml" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_map_window.layout" "${DDIR}/openmw_map_window.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_map_window_skin.xml" "${DDIR}/openmw_map_window_skin.xml" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw.pointer.xml" "${DDIR}/openmw.pointer.xml" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_progress.skin.xml" "${DDIR}/openmw_progress.skin.xml" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_stats_window.layout" "${DDIR}/openmw_stats_window.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_text.skin.xml" "${DDIR}/openmw_text.skin.xml" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_windows.skin.xml" "${DDIR}/openmw_windows.skin.xml" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_messagebox.layout" "${DDIR}/openmw_messagebox.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_interactive_messagebox.layout" "${DDIR}/openmw_interactive_messagebox.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_journal.layout" "${DDIR}/openmw_journal.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_journal_skin.xml" "${DDIR}/openmw_journal_skin.xml" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_tooltips.layout" "${DDIR}/openmw_tooltips.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_scroll.layout" "${DDIR}/openmw_scroll.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_scroll_skin.xml" "${DDIR}/openmw_scroll_skin.xml" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_book.layout" "${DDIR}/openmw_book.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_count_window.layout" "${DDIR}/openmw_count_window.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_trade_window.layout" "${DDIR}/openmw_trade_window.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_settings_window.layout" "${DDIR}/openmw_settings_window.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_confirmation_dialog.layout" "${DDIR}/openmw_confirmation_dialog.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_alchemy_window.layout" "${DDIR}/openmw_alchemy_window.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/openmw_spell_window.layout" "${DDIR}/openmw_spell_window.layout" COPYONLY)
|
|
||||||
configure_file("${SDIR}/atlas1.cfg" "${DDIR}/atlas1.cfg" COPYONLY)
|
|
||||||
configure_file("${SDIR}/smallbars.png" "${DDIR}/smallbars.png" COPYONLY)
|
|
||||||
configure_file("${SDIR}/EBGaramond-Regular.ttf" "${DDIR}/EBGaramond-Regular.ttf" COPYONLY)
|
|
||||||
configure_file("${SDIR}/Obliviontt.zip" "${DDIR}/Obliviontt.zip" COPYONLY)
|
|
||||||
configure_file("${SDIR}/VeraMono.ttf" "${DDIR}/VeraMono.ttf" COPYONLY)
|
|
||||||
|
Loading…
Reference in New Issue