Skip to content

Commit

Permalink
Fix models with "Shadeless" shader showing up black
Browse files Browse the repository at this point in the history
  • Loading branch information
cochrane committed Apr 2, 2021
1 parent 8a9a601 commit a863cf5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions GLLara/Model Parameters/xnaLaraDefault.modelparams.plist
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,8 @@
<dict>
<key>defines</key>
<dict>
<key>SHADELESS</key>
<string>1</string>
<key>USE_SKINNING</key>
<string>1</string>
</dict>
Expand Down
3 changes: 3 additions & 0 deletions GLLara/Shaders/Combined.fs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ void main()
#endif

vec4 color = vec4(0);
#ifdef SHADELESS
color = diffuseColor;
#endif
#ifdef AMBIENT_COLOR
color += lightData.ambientColor * diffuseColor;
#ifdef MATERIAL_PARAMETERS
Expand Down

0 comments on commit a863cf5

Please sign in to comment.