News for hackers. Stuff that matters.
Re:Linux in a Pixel Shader – A RISC-V Emulator for VRChat by kevingadd on Friday August 27, 2021 @01:18PM (#28330473)
"One of the many problems with shader code is that HLSL doesn’t support arrays in a meaningful way. Pointer math (and thus array indexing) just isn’t a thing on the GPU, so writing to a non-constant index of an array is impossible. To work around this, there are several places in the code with patterns like this:"

This is weird, AFAIK pixel shaders have had arrays since DX10 and the OpenGL equivalent through Buffers (and also Unordered Access Views for reading/writing pixel data) https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/...

Are VRChat shaders stuck to Direct3D9/ps_3_0 level functionality?

Re:Linux in a Pixel Shader – A RISC-V Emulator for VRChat by pema99 on Friday August 27, 2021 @06:00PM (#28333426)
No, we can use SM 5.0. It's all DX11. It's not that the framework the game is written in doesn't support such features, we just have no way to bind UAVs for example. What you can do on the CPU is very very limited, while GPU code is completely unrestricted, so we are at the mercy of whatever Unity lets you do on GPU with minimal setup.