Skip to content

Commit

Permalink
Fixed|Renderer: Missing blending modes in DGL shader
Browse files Browse the repository at this point in the history
DGL texture modulation modes 5 and 7 were missing. These were being used for additive dynamic lights (e.g., when fog is enabled).

IssueID #2318
  • Loading branch information
skyjake committed Jan 27, 2019
1 parent 3a39974 commit 4093875
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,19 @@ void main()
out_FragColor.rgb += texColor[0].a * uTexModeColor[vBatchIndex].rgb;
out_FragColor *= texColor[1];
break;
case 5:
// DM_TEXTURE_PLUS_LIGHT
out_FragColor *= texColor[0];
out_FragColor.rgb += texColor[1].a * uTexModeColor[vBatchIndex].rgb;
break;
case 6:
// Simple dynlight addition (add to primary color).
out_FragColor.rgb += texColor[0].a * uTexModeColor[vBatchIndex].rgb;
break;
case 7:
// Dynlight without primary color.
out_FragColor.rgb = texColor[0].a * uTexModeColor[vBatchIndex].rgb;
break;
case 8:
// Texture and Detail.
out_FragColor *= texColor[0];
Expand Down
2 changes: 2 additions & 0 deletions doomsday/apps/client/src/gl/dgl_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,9 @@ void DGL_ModulateTexture(int mode)
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 10:
case 11:
Expand Down

0 comments on commit 4093875

Please sign in to comment.