#Broken code

1 messages · Page 1 of 1 (latest)

terse pumice
#

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 )

modern vale
#

Do you perhaps have the code

terse pumice
#

i do

modern vale
#

might you share the code

terse pumice
#

The renderer and the shaders?

silk stirrupBOT
#

@terse pumice has reached level 1. GG!

terse pumice
#

I can try

modern vale
#

hmmm

#

not sure

#

i havent done opengl in a whileee

terse pumice
#

Then i will try sending both

#

Im new, my code sucks

modern vale
#

hmmmmmmm

#

its alright

terse pumice
#

also i forgot main,

modern vale
#

Wait for someone smarter, theyll come very soon

terse pumice
#

Alright, thank you

terse pumice
#

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

silk stirrupBOT
#

@terse pumice has reached level 2. GG!

terse pumice
#

because its not an UV

modern vale
#

do you have it per pixel or from -1 to 1

#

yeah that makes sence

terse pumice
#

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ú

terse pumice
#

been trying for atleast 3 hours now, nonstop

modern vale
#

Damn bro

slender inlet
modern vale
terse pumice
#

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

forest depot
#

wait

#

do i have to use GLFW/glad to work with OpenGL?

#

i barely know what i'm doing 😭

terse pumice
#

Probably

#

I mean they just make it easier