Update
This commit is contained in:
13
resources/debug/debug.frag
Normal file
13
resources/debug/debug.frag
Normal file
@@ -0,0 +1,13 @@
|
||||
OGRE_NATIVE_GLSL_VERSION_DIRECTIVE
|
||||
#include <OgreUnifiedShader.h>
|
||||
|
||||
OGRE_UNIFORMS(
|
||||
uniform vec4 ambient;
|
||||
uniform vec4 diffuse;
|
||||
)
|
||||
|
||||
MAIN_PARAMETERS
|
||||
MAIN_DECLARATION
|
||||
{
|
||||
gl_FragColor = ambient * diffuse;
|
||||
}
|
||||
71
resources/debug/debug.material
Normal file
71
resources/debug/debug.material
Normal file
@@ -0,0 +1,71 @@
|
||||
material Skybox/Debug1
|
||||
{
|
||||
technique
|
||||
{
|
||||
pass
|
||||
{
|
||||
lighting off
|
||||
depth_write off
|
||||
ambient 1.0 0.0 0.0 1.0
|
||||
diffuse 1.0 0.0 0.0 1.0
|
||||
vertex_program_ref debug_vp
|
||||
{
|
||||
}
|
||||
fragment_program_ref debug_fp
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
material Debug/Red
|
||||
{
|
||||
technique
|
||||
{
|
||||
pass
|
||||
{
|
||||
lighting off
|
||||
depth_check on
|
||||
depth_write on
|
||||
depth_func always_pass
|
||||
ambient 1.0 0.0 0.0 1.0
|
||||
diffuse vertexcolour
|
||||
specular 0.0 0.0 0.0 1.0
|
||||
cull_software none
|
||||
cull_hardware none
|
||||
/*
|
||||
rtshader_system
|
||||
{
|
||||
lighting_stage metal_roughness
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
material Debug/Red2
|
||||
{
|
||||
technique
|
||||
{
|
||||
pass
|
||||
{
|
||||
lighting off
|
||||
depth_check on
|
||||
depth_write on
|
||||
depth_func always_pass
|
||||
ambient 1.0 0.0 0.0 1.0
|
||||
diffuse vertexcolour
|
||||
specular 0.0 0.0 0.0 1.0
|
||||
cull_software none
|
||||
cull_hardware none
|
||||
|
||||
rtshader_system
|
||||
{
|
||||
lighting_stage metal_roughness
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
19
resources/debug/debug.program
Normal file
19
resources/debug/debug.program
Normal file
@@ -0,0 +1,19 @@
|
||||
fragment_program debug_fp glsl glsles glslang hlsl
|
||||
{
|
||||
source debug.frag
|
||||
default_params
|
||||
{
|
||||
param_named_auto ambient surface_ambient_colour
|
||||
param_named_auto diffuse surface_diffuse_colour
|
||||
}
|
||||
}
|
||||
|
||||
vertex_program debug_vp glsl glsles glslang hlsl
|
||||
{
|
||||
source debug.vert
|
||||
default_params
|
||||
{
|
||||
param_named_auto worldViewProj worldviewproj_matrix
|
||||
}
|
||||
}
|
||||
|
||||
25
resources/debug/debug.vert
Normal file
25
resources/debug/debug.vert
Normal file
@@ -0,0 +1,25 @@
|
||||
OGRE_NATIVE_GLSL_VERSION_DIRECTIVE
|
||||
#include <OgreUnifiedShader.h>
|
||||
|
||||
OGRE_UNIFORMS(
|
||||
uniform mat4 worldViewProj;
|
||||
)
|
||||
|
||||
MAIN_PARAMETERS
|
||||
IN(vec4 vertex, POSITION)
|
||||
IN(vec3 normal, NORMAL)
|
||||
IN(vec3 tangent, TANGENT)
|
||||
IN(vec3 uv0, TEXCOORD0)
|
||||
// uniform mat4 worldViewProj;
|
||||
|
||||
// attribute vec4 vertex;
|
||||
// attribute vec3 normal;
|
||||
// attribute vec4 tangent;
|
||||
// attribute vec2 uv0;
|
||||
|
||||
MAIN_DECLARATION
|
||||
// void main()
|
||||
{
|
||||
// gl_Position = mul(worldViewProj, position);
|
||||
gl_Position = worldViewProj * vertex;
|
||||
}
|
||||
Reference in New Issue
Block a user