Fix T46128: High Quality DoF broken
The issue was caused by some special tricks needed to compile OpenSubdiv shader which was using stupid check whether geometry shader is used or not. Now made it more explicit call whether special OpenSubdiv trickery is needed or not. Its not ideal solution, but it's not really easy to do a proper solution for this, because while we can do half of the work with if-defs in the shader code but we'll still need to somewhat define layout of the input blocks which isn't really doable with current shader version we're using.
This commit is contained in:
@@ -1615,7 +1615,16 @@ GPUPass *GPU_generate_pass(ListBase *nodes, GPUNodeLink *outlink,
|
||||
fragmentcode = code_generate_fragment(nodes, outlink->output);
|
||||
vertexcode = code_generate_vertex(nodes, type);
|
||||
geometrycode = code_generate_geometry(nodes, use_opensubdiv);
|
||||
shader = GPU_shader_create(vertexcode, fragmentcode, geometrycode, glsl_material_library, NULL, 0, 0, 0);
|
||||
shader = GPU_shader_create_ex(vertexcode,
|
||||
fragmentcode,
|
||||
geometrycode,
|
||||
glsl_material_library,
|
||||
NULL,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
use_opensubdiv ? GPU_SHADER_FLAGS_SPECIAL_OPENSUBDIV
|
||||
: GPU_SHADER_FLAGS_NONE);
|
||||
|
||||
/* failed? */
|
||||
if (!shader) {
|
||||
|
||||
Reference in New Issue
Block a user