git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9315 75d07b2b-3a1a-0410-a2c5-0572b91ccdca3.0
parent
2d12c4eaf8
commit
5d37b914e1
@ -1,27 +0,0 @@ |
|||||||
#import "Common/ShaderLib/Texture.glsllib" |
|
||||||
|
|
||||||
varying vec2 texCoord; |
|
||||||
|
|
||||||
uniform sampler2D m_ColorMap; |
|
||||||
|
|
||||||
void main(){ |
|
||||||
//Texture_GetColor(m_ColorMap, texCoord) |
|
||||||
//vec4 color = texture2D(m_ColorMap, texCoord); |
|
||||||
//color.rgb *= color.a; |
|
||||||
//gl_FragColor = vec4(color.a); |
|
||||||
|
|
||||||
#ifdef NORMAL_LATC |
|
||||||
vec3 newNorm = vec3(texture2D(m_ColorMap, texCoord).ag, 0.0); |
|
||||||
newNorm = Common_UnpackNormal(newNorm); |
|
||||||
newNorm.b = sqrt(1.0 - (newNorm.x * newNorm.x) - (newNorm.y * newNorm.y)); |
|
||||||
newNorm = Common_PackNormal(newNorm); |
|
||||||
gl_FragColor = vec4(newNorm, 1.0); |
|
||||||
#elif defined(SHOW_ALPHA) |
|
||||||
gl_FragColor = vec4(texture2D(m_ColorMap, texCoord).a); |
|
||||||
#else |
|
||||||
gl_FragColor = Texture_GetColor(m_ColorMap, texCoord); |
|
||||||
#endif |
|
||||||
#ifdef NORMALIZE |
|
||||||
gl_FragColor = vec4(normalize(gl_FragColor.xyz), gl_FragColor.a); |
|
||||||
#endif |
|
||||||
} |
|
@ -1,32 +0,0 @@ |
|||||||
Exception SimpleTextured.j3md has been marked as obsolete. Please use Unshaded.j3md instead. |
|
||||||
|
|
||||||
MaterialDef Plain Texture { |
|
||||||
|
|
||||||
MaterialParameters { |
|
||||||
Texture2D ColorMap |
|
||||||
Boolean YCoCg |
|
||||||
Boolean LATC |
|
||||||
Boolean Normalize |
|
||||||
Boolean ShowAlpha |
|
||||||
} |
|
||||||
|
|
||||||
Technique { |
|
||||||
VertexShader GLSL100: Common/MatDefs/Misc/SimpleTextured.vert |
|
||||||
FragmentShader GLSL100: Common/MatDefs/Misc/SimpleTextured.frag |
|
||||||
|
|
||||||
WorldParameters { |
|
||||||
WorldViewProjectionMatrix |
|
||||||
} |
|
||||||
|
|
||||||
Defines { |
|
||||||
DXT_YCOCG : YCoCg |
|
||||||
NORMAL_LATC : LATC |
|
||||||
NORMALIZE : Normalize |
|
||||||
SHOW_ALPHA : ShowAlpha |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
Technique FixedFunc { |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,11 +0,0 @@ |
|||||||
uniform mat4 g_WorldViewProjectionMatrix; |
|
||||||
|
|
||||||
attribute vec3 inPosition; |
|
||||||
attribute vec2 inTexCoord; |
|
||||||
|
|
||||||
varying vec2 texCoord; |
|
||||||
|
|
||||||
void main(){ |
|
||||||
gl_Position = g_WorldViewProjectionMatrix * vec4(inPosition, 1.0); |
|
||||||
texCoord = inTexCoord; |
|
||||||
} |
|
@ -1,44 +0,0 @@ |
|||||||
Exception SolidColor.j3md has been marked as obsolete. Please use Unshaded.j3md instead. |
|
||||||
|
|
||||||
MaterialDef Solid Color { |
|
||||||
|
|
||||||
MaterialParameters { |
|
||||||
Vector4 Color |
|
||||||
|
|
||||||
// Texture of the glowing parts of the material |
|
||||||
Texture2D GlowMap |
|
||||||
// The glow color of the object |
|
||||||
Color GlowColor |
|
||||||
} |
|
||||||
|
|
||||||
Technique { |
|
||||||
VertexShader GLSL100: Common/MatDefs/Misc/Unshaded.vert |
|
||||||
FragmentShader GLSL100: Common/MatDefs/Misc/Unshaded.frag |
|
||||||
|
|
||||||
Defines { |
|
||||||
HAS_COLOR : Color |
|
||||||
} |
|
||||||
|
|
||||||
WorldParameters { |
|
||||||
WorldViewProjectionMatrix |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
Technique FixedFunc { |
|
||||||
} |
|
||||||
|
|
||||||
Technique Glow { |
|
||||||
|
|
||||||
VertexShader GLSL100: Common/MatDefs/Misc/Unshaded.vert |
|
||||||
FragmentShader GLSL100: Common/MatDefs/Light/Glow.frag |
|
||||||
|
|
||||||
WorldParameters { |
|
||||||
WorldViewProjectionMatrix |
|
||||||
} |
|
||||||
|
|
||||||
Defines { |
|
||||||
HAS_GLOWMAP : GlowMap |
|
||||||
HAS_GLOWCOLOR : GlowColor |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,18 +0,0 @@ |
|||||||
Exception VertexColor.j3md has been marked as obsolete. Please use Unshaded.j3md instead. |
|
||||||
|
|
||||||
MaterialDef Vertex Color { |
|
||||||
|
|
||||||
Technique { |
|
||||||
VertexShader GLSL100: Common/MatDefs/Misc/Unshaded.vert |
|
||||||
FragmentShader GLSL100: Common/MatDefs/Misc/Unshaded.frag |
|
||||||
|
|
||||||
Defines { |
|
||||||
HAS_VERTEXCOLOR |
|
||||||
} |
|
||||||
|
|
||||||
WorldParameters { |
|
||||||
WorldViewProjectionMatrix |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,38 +0,0 @@ |
|||||||
Exception WireColor.j3md has been marked as obsolete. Please use Unshaded.j3md instead. |
|
||||||
|
|
||||||
MaterialDef Wire Color { |
|
||||||
|
|
||||||
MaterialParameters { |
|
||||||
Vector4 Color : Color |
|
||||||
} |
|
||||||
|
|
||||||
Technique { |
|
||||||
VertexShader GLSL100: Common/MatDefs/Misc/Unshaded.vert |
|
||||||
FragmentShader GLSL100: Common/MatDefs/Misc/Unshaded.frag |
|
||||||
|
|
||||||
RenderState { |
|
||||||
FaceCull Off |
|
||||||
Blend Alpha |
|
||||||
AlphaTestFalloff 0.01 |
|
||||||
Wireframe On |
|
||||||
} |
|
||||||
|
|
||||||
Defines { |
|
||||||
HAS_COLOR : Color |
|
||||||
} |
|
||||||
|
|
||||||
WorldParameters { |
|
||||||
WorldViewProjectionMatrix |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
Technique FixedFunc { |
|
||||||
RenderState { |
|
||||||
FaceCull Off |
|
||||||
Blend Alpha |
|
||||||
AlphaTestFalloff 0.01 |
|
||||||
Wireframe On |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
Loading…
Reference in new issue