A complete 3D game development suite written purely in Java.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
jmonkeyengine/jme3-effects/src/main/resources/Common/MatDefs/SSAO/normal.vert

22 lines
623 B

#import "Common/ShaderLib/GLSLCompat.glsllib"
#import "Common/ShaderLib/Instancing.glsllib"
#import "Common/ShaderLib/Skinning.glsllib"
attribute vec3 inPosition;
attribute vec3 inNormal;
attribute vec4 inTexCoord;
varying vec3 normal;
varying vec2 texCoord;
void main(void)
{
texCoord=inTexCoord.xy;
vec4 modelSpacePos = vec4(inPosition, 1.0);
vec3 modelSpaceNormals = inNormal;
#ifdef NUM_BONES
Skinning_Compute(modelSpacePos,modelSpaceNormals);
#endif
normal = normalize(TransformNormal(modelSpaceNormals));
gl_Position = TransformWorldViewProjection(modelSpacePos);
}