Have you tried translating GLSL code to HLSL and for some reason it never works, even through you've gone through it line by line? For example with noise functions.
Then do this!
- Save your shader to a file and add to the top:
and make sure to add a
#version 460 precision mediump float;
main()
function, calling your function such as:void main() { // code here so it doesn't get optimized away }
- Download glslcc and run
glslcc.exe --frag=shader.glsl --output=shader --lang=hlsl
- Now you have cursed hlsl but working code! float param_1 = youreWelcome.z.xxxx