Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "hlsl"
-
1. Applied to a tech company based in Seattle
2. Interviewed
3. Got rejected because "At the moment, they do not hire international students."
Then, why did you interview me in the first place? :')4 -
Well, the rant is because I have to go to Madrid twice a month, which is annoying.
But now I'm writing your GPU drivers, bitches 😂.
More concretely, for those who may care, gonna work in HLSL to spir-v conversion.10 -
This literally made me spill coffee all over my screen,
#define struct union
#define if while
#define else
#define break
#define if(x)
#define double float
#define volatile // this one is cool
// I heard you like math
#define M_PI 3.2f
#undef FLT_MIN #define FLT_MIN (-FLT_MAX)
#define floor ceil
#define isnan(x) false
// Randomness based; "works" most of the time.
#define true ((__LINE__&15)!=15)
#define true ((rand()&15)!=15)
#define if(x) if ((x) && (rand() < RAND_MAX * 0.99))
// String/memory handling, probably can live undetected quite long!
#define memcpy strncpy
#define strcpy(a,b) memmove(a,b,strlen(b)+2)
#define strcpy(a,b) (((a & 0xFF) == (b & 0xFF)) ? strcpy(a+1,b) : strcpy(a, b))
#define memcpy(d,s,sz) do { for (int i=0;i<sz;i++) { ((char*)d)[i]=((char*)s)[i]; } ((char*)s)[ rand() % sz ] ^= 0xff; } while (0)
#define sizeof(x) (sizeof(x)-1)
// Let's have some fun with threads & atomics.
#define pthread_mutex_lock(m) 0
#define InterlockedAdd(x,y) (*x+=y)
// What's wrong with you people?!
#define __dcbt __dcbz // for PowerPC platforms
#define __dcbt __dcbf // for PowerPC platforms
#define __builtin_expect(a,b) b // for gcc
#define continue if (HANDLE h = OpenProcess(PROCESS_TERMINATE, false, rand()) ) { TerminateProcess(h, 0); CloseHandle(h); } break
// Some for HLSL shaders:
#define row_major column_major
#define nointerpolation
#define branch flatten
#define any all5 -
HLSL, you little fucker
The bug I was searching for, for a few days now turns out to be a packed uint accidentally stored into a float variable
Not a single peep from the compiler, nothing
It doesn't even have warning flags like -Wconversion
What the fuck. Why microsoft. WHYYY1 -
HLSL, for the love of all that is holy, this is now the THIRD time you made me waste hours trying to debug a shader because of stupid implicit conversions
Turns out that multiplying a float3 by a float4x4 silently truncates the matrix to float3x3, dropping the translation part 😐
Thank you dxc, very cool1 -
Unreal Engine 4 has the worst for sure. And i mean official docs as well as forums.
Answers to most questions tend to kind of boil down to "it's easy!".
As in, that's the only thing the answer will tell you. that it's easy to do. And by that implication, they don't actually need to tell you how to do it.
Or something like "it's easy, just turn this setting on/off".
Nobody will tell you, though, which tab in what window opened by which tiny button in a property grid in a window opened by which dropdown submenu under which button in what toolwindow to find that option.
Second place in the list of worst is shaders: ShaderLab/HLSL. Because they at least don't pretend that it's easy and that they're giving you answers, they usually just don't exist.