Source
- URL: https://x.com/EricLengyel/status/1475217195193942018
- Author: Eric Lengyel (@EricLengyel)
- Posted: 2021-12-26 21:29:22
Thread
1/ @EricLengyel
It sure would be nice if we had a 100% common language syntax and function library instead of a bunch of random differences among GLSL, HLSL, and PSSL. Anybody know why Cg didn’t work out? I remember it being very well done.
2/ @EricLengyel
HLSL and PSSL have float, float2, float3, and float4.
GLSL has float, vec2, vec3, and vec4.
HLSL and PSSL have lerp().
GLSL has mix().
HLSL and PSSL have frac().
GLSL has fract().
HLSL and PSSL have ddx() and ddy().
GLSL has dFdx() and dFdy().
3/ @EricLengyel
HLSL has Texture2DArray.
PSSL has Texture2D_Array.
GLSL has sampler2DArray.
4/ @EricLengyel
HLSL has bool frontFacing : SV_IsFrontFace.
PSSL has float frontFacing : S_FRONT_FACE.
GLSL has bool gl_FrontFacing.
Branches: 2021-12-26-hakimshafaei-wgsl-webgpu-has-its-own-story-as-well, 2021-12-27-Dennis_A_Landi-it-looks-like-a-wrapper-interface-needs-to-be, 2021-12-27-KeelanStuart-iirc-there-is-also-a-difference-with-saturate-and