Files
WickedEngine/WickedEngine/shaders/forceFieldPointVisualizerVS.hlsl
T
Turánszki János 86c748ed98 Spotlight inner cone, GLTF KHR_lights_punctual (#474)
* added inner cone angle to spotlights

* refactors

* different shader entity packing

* KHR_lights_punctual

* features.txt

* spot cutoff

* seri

* fixes

* update

* angularAttenuation mad

* refactor

* attenuation refactors
2022-06-28 23:10:48 +02:00

31 lines
534 B
HLSL

#include "globals.hlsli"
#include "uvsphere.hlsli"
struct PSIn
{
float4 pos : SV_POSITION;
float4 pos3D : TEXCOORD0;
float4 pos2D : TEXCOORD1;
};
PSIn main(uint vID : SV_VERTEXID)
{
PSIn Out;
Out.pos = UVSPHERE[vID];
uint forceFieldID = GetFrame().forcefieldarray_offset + (uint)g_xColor.w;
ShaderEntity forceField = load_entity(forceFieldID);
Out.pos.xyz *= forceField.GetRange();
Out.pos.xyz += forceField.position;
Out.pos3D = Out.pos;
Out.pos = mul(g_xTransform, Out.pos);
Out.pos2D = Out.pos;
return Out;
}