Support materials in 2D Quad Renderer!

- Lost Circle rendering along the way
- Cleaned up 2D shaders
This commit is contained in:
Simon Lübeß
2025-02-11 14:02:16 +01:00
parent 76087d6ba4
commit 06b981e88a
9 changed files with 223 additions and 188 deletions
@@ -87,4 +87,15 @@ float GetBitangentHandedness(float tangentz)
return (z & 1) > 0 ? 1.0 : -1.0;
}
/**
* Transforms the given texture coordinates using the provided UV transform.
* @param texcoords The texture coordinates to transform.
* @param uvTransform the UV transform. X, Y: UV offset | Z, W: UV scaling.
* @return The transformed uv coordinates.
*/
float2 TransformTexcoords(float2 texcoords, float4 uvTransform)
{
return uvTransform.xy + uvTransform.zw * texcoords;
}
#endif // __SHADER_HELPERS_HLSL__