mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Support materials in 2D Quad Renderer!
- Lost Circle rendering along the way - Cleaned up 2D shaders
This commit is contained in:
@@ -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__
|
||||
Reference in New Issue
Block a user