Page MenuHome

Set useMatcap for fragment shader
ClosedPublic

Authored by Robert Guetzkow (rjg) on Apr 22 2020, 12:00 AM.

Details

Summary

This patch fixes T75938 by setting useMatcap for the workbench prepass fragment shader. This results in a correct assignment of materialData.a = float(gl_FrontFacing); in workbench_prepass_frag.glsl when matcaps are used.

Diff Detail

Repository
rB Blender
Branch
2020-04-21-fix-workbench-matcap-normals (branched from master)
Build Status
Buildable 7670
Build 7670: arc lint + arc unit

Event Timeline

Robert Guetzkow (rjg) requested review of this revision.Apr 22 2020, 12:00 AM
Robert Guetzkow (rjg) edited the summary of this revision. (Show Details)Apr 22 2020, 12:09 AM
Robert Guetzkow (rjg) edited the summary of this revision. (Show Details)
Clément Foucault (fclem) requested changes to this revision.Apr 22 2020, 12:29 AM
Clément Foucault (fclem) added inline comments.
source/blender/draw/engines/workbench/workbench_opaque.c
94–95

I think you need it here too.

This revision now requires changes to proceed.Apr 22 2020, 12:29 AM
  • Add useMatcap to the common shader group of the prepass
Robert Guetzkow (rjg) marked an inline comment as done.Apr 22 2020, 10:22 AM
Robert Guetzkow (rjg) added inline comments.
source/blender/draw/engines/workbench/workbench_opaque.c
94–95

As far as I could tell, it worked fine when adding it only to the vertex color shader group. There's no harm adding it here as well though.

Robert Guetzkow (rjg) marked an inline comment as done.Apr 22 2020, 2:05 PM
This revision is now accepted and ready to land.Apr 22 2020, 2:24 PM