Use textureLod instead of the texture - #1567
Conversation
|
ping for review |
|
Code changes look good, but there doesn't seem to be an updated SPIR-V file for the rayquery_morpheus.frag shader. |
Right, the rayquery_morpheus.frag.spv is uploaded. |
|
|
|
@SaschaWillems I think there is something wrong with Clang Tidy in the CI environment. I am facing the same issue in a different PR (#1572). |
|
Looks to be the case. I have no clue about that CI step, so can't really help. Maybe @gpx1000 knows. |
texture() compiles to OpImageSampleImplicitLod, which needs screen-space derivatives of the UV if (rayQueryGetIntersectionTypeEXT(...) != ...NoneEXT) is per pixel ray query. one pixel ray query of the quad can hit while neighor misses. So the divergent branch does not match the texture, should use textureLod which does not require the screen-space derivatives of quad pixels.
re-commit to see if CI can run successfully this time. |
Description
texture() compiles to OpImageSampleImplicitLod, which needs screen-space derivatives of the UV if (rayQueryGetIntersectionTypeEXT(...) != ...NoneEXT) is per pixel ray query. one pixel ray query of the quad can hit while neighor misses.
So the divergent branch does not match the texture, should use textureLod which does not require the screen-space derivatives of quad pixels.
this PR Fixes ##1566
it replace texture with textureLoad, Hoisting the sample above the if isn't an option here
General Checklist:
Please ensure the following points are checked:
Note: The Samples CI runs a number of checks including:
If this PR contains framework changes:
batchcommand line argument to make sure all samples still work properlySample Checklist
If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist: