Im working on textures for the renderer of my game. And it broke, it draws half of what it should, everything seems to be working other than GPU-CPU communication, but i dont see any problems with that either as the data on the GPU ( fragment shader ) is correct. My project is very large and it becomes painful even to rewrite these. Im new to C++ ( and OpenGL ) and i think the solution would be obvious for somone who knows either of those. ( Just joined the server, i dont know how anything works, i hope i did not break any rules )
#Broken code
1 messages · Page 1 of 1 (latest)
Do you perhaps have the code
i do
might you share the code
The renderer and the shaders?
@terse pumice has reached level 1. GG!
I can try
Then i will try sending both
I asked for some ChatGPT help before this, the shaders might have some left
Im new, my code sucks
Wait for someone smarter, theyll come very soon
Alright, thank you
I might restart, but this makes no sense
i have no idea
this line seems to be faulty uvec2 atlasPos = uvec2(fragTex.x + relativePixelPos.x, fragTex.y + relativePixelPos.y);
please someone, chatgpt is stupid
@terse pumice has reached level 2. GG!
hmmm
why unsigned
because its not an UV
per pixel i think
relativePixelPos should be where it is in the "region" what is fragTex
x and y are the start of the region, while z and w are the end position
and it specified where is it inside that
and i think the problem is with the way i try getting the position of it in the atlas
NO, that works
im lost againú
been trying for atleast 3 hours now, nonstop
Damn bro
no one smarter came T_T
you did
it turns out that the problem is with GLSL
IT WORKS
hardcoded all variables other than UV asked chatgpt to precisely remake everything so GLSL likes it, and it works