I tried out the following:
Code
float2 normalizedProjectionCoordinatesXY = mul(float4(vecLightViewPos[i].xyz, 1.0f), matProj).xy;
float normalizedProjectionCoordinatesOfOuterPointOfLightSphereX = mul(float4(vecLightViewPos[i].xy, vecLightViewPos[i].z - vecLightViewPos[i].w, 1.0f), matProj).x;
float projectedLightRadiusInScreenPixels = vecViewPort.x * (normalizedProjectionCoordinatesOfOuterPointOfLightSphereX - normalizedProjectionCoordinatesXY.x) / 2.0f;
float2 screenCoordinates = (0.5f + normalizedProjectionCoordinatesXY * 0.5f) * vecViewPort.xy;
So I set position to screenCoordinates.xy and range to projectedLightRadiusInScreenPixels, but screen is plain dark grin
Tried out matWorldViewProj and matViewProj instead of matProj, but no changes... Also, does vecLightViewPos[i].w contain lightrange?

Edit: this is what I want to archive at the end
[Linked Image]

Last edited by 3run; 05/13/20 15:34.

Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung