Water is in ECS; water material is created in code
This commit is contained in:
14
water/depth.frag
Normal file
14
water/depth.frag
Normal file
@@ -0,0 +1,14 @@
|
||||
OGRE_NATIVE_GLSL_VERSION_DIRECTIVE
|
||||
#include <OgreUnifiedShader.h>
|
||||
|
||||
OGRE_UNIFORMS(
|
||||
uniform vec3 cameraPosition;
|
||||
)
|
||||
MAIN_PARAMETERS
|
||||
IN(vec4 position, POSITION)
|
||||
IN(vec3 positionWS, TEXCOORD0)
|
||||
MAIN_DECLARATION
|
||||
{
|
||||
vec4 depth = vec4(length(positionWS - cameraPosition), 0.0, 0.0, 1.0);
|
||||
gl_FragColor = depth;
|
||||
}
|
||||
Reference in New Issue
Block a user