File tree 2 files changed +41
-1
lines changed
jme3-core/src/main/resources/Common/MatDefs/Light
2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change
1
+ #import "Common/ ShaderLib/ GLSLCompat.glsllib"
2
+ #if defined(NEED_TEXCOORD1)
3
+ varying vec2 texCoord1;
4
+ #else
5
+ varying vec2 texCoord;
6
+ #endif
7
+
8
+
9
+ #ifdef HAS_EMISSIVEMAP
10
+ uniform sampler2D m_EmissiveMap;
11
+ #endif
12
+
13
+ #ifdef HAS_EMISSIVECOLOR
14
+ uniform vec4 m_Emissive;
15
+ #endif
16
+
17
+
18
+ void main(){
19
+ #ifdef HAS_EMISSIVEMAP
20
+ #ifdef HAS_EMISSIVECOLOR
21
+ vec4 color = m_Emissive;
22
+ #else
23
+ vec4 color = vec4 (1.0 );
24
+ #endif
25
+
26
+ #if defined(NEED_TEXCOORD1)
27
+ gl_FragColor = texture2D (m_EmissiveMap, texCoord1) * color;
28
+ #else
29
+ gl_FragColor = texture2D (m_EmissiveMap, texCoord) * color;
30
+ #endif
31
+ #else
32
+ #ifdef HAS_EMISSIVECOLOR
33
+ gl_FragColor = m_Emissive;
34
+ #else
35
+ gl_FragColor = vec4 (0.0 );
36
+ #endif
37
+ #endif
38
+ }
Original file line number Diff line number Diff line change @@ -280,7 +280,7 @@ MaterialDef PBR Lighting {
280
280
Technique Glow {
281
281
282
282
VertexShader GLSL300 GLSL150 GLSL100: Common/MatDefs/Misc/Unshaded.vert
283
- FragmentShader GLSL300 GLSL150 GLSL100: Common/MatDefs/Light/Glow .frag
283
+ FragmentShader GLSL300 GLSL150 GLSL100: Common/MatDefs/Light/PBRGlow .frag
284
284
285
285
WorldParameters {
286
286
WorldViewProjectionMatrix
@@ -289,6 +289,8 @@ MaterialDef PBR Lighting {
289
289
}
290
290
291
291
Defines {
292
+ HAS_EMISSIVEMAP : EmissiveMap
293
+ HAS_EMISSIVECOLOR : Emissive
292
294
BOUND_DRAW_BUFFER: BoundDrawBuffer
293
295
NEED_TEXCOORD1
294
296
NUM_BONES : NumberOfBones
You can’t perform that action at this time.
0 commit comments