Updated shiny effect shader
This commit is contained in:
parent
c6f49e45e4
commit
c7c8e0046d
|
@ -78,8 +78,14 @@ void main()
|
||||||
outEntityID = In2.eid;
|
outEntityID = In2.eid;
|
||||||
lightLayerIndices = In2.lightLayerIndex;
|
lightLayerIndices = In2.lightLayerIndex;
|
||||||
|
|
||||||
float vpHeight = float (In2.screenSpacePos.y) - MatProp.data[In2.materialIndex].highlightPosition;
|
// float vpHeight = float (In2.screenSpacePos.y) - MatProp.data[In2.materialIndex].highlightPosition;
|
||||||
vpHeight = float (int (vpHeight) % genericDataBuffer.data.viewportHeight);
|
// bring the frame of reference to the object's screen space pos
|
||||||
|
int scale = 470;
|
||||||
|
float vpHeight = float (In2.screenSpacePos.y);
|
||||||
|
float relativePos = float(int (-MatProp.data[In2.materialIndex].highlightPosition) % scale) - float (scale / 2);
|
||||||
|
vpHeight += relativePos;
|
||||||
|
|
||||||
|
// vpHeight = float (int (vpHeight) % genericDataBuffer.data.viewportHeight);
|
||||||
float scanlineScale = MatProp.data[In2.materialIndex].thickness * (1.0f - In2.screenSpacePos.z) * 100.0f;
|
float scanlineScale = MatProp.data[In2.materialIndex].thickness * (1.0f - In2.screenSpacePos.z) * 100.0f;
|
||||||
|
|
||||||
float lowerLimit = vpHeight - scanlineScale;
|
float lowerLimit = vpHeight - scanlineScale;
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue