Culling is off

Culling is off
63 Replies
Kai
Kai16mo ago
Ok so looking at this
Kai
Kai16mo ago
I presume this is correct
Wulferis
WulferisOP16mo ago
Yeah thats the correct data being fed into the Position buffer
Wulferis
WulferisOP16mo ago
No description
Kai
Kai16mo ago
was this supposed to be indexed? You provide 6 to glDrawElements, but the index buffer seems empty?
Wulferis
WulferisOP16mo ago
No description
Wulferis
WulferisOP16mo ago
In the Index buffer set RenderDoc byte offset to 0?
Kai
Kai16mo ago
yes Stride 4, which should be right for uint, offset 0, divisior 0, 24 bytes (=6 ints) oh no wait? Maybe the start is 24 maybe renderdoc is playing me, but it started with 24 there at the top
Wulferis
WulferisOP16mo ago
Yeah it does that to me too We think its a RenderDoc bug
Kai
Kai16mo ago
Hmm, seems fishy but maybe?
Wulferis
WulferisOP16mo ago
yeah i havent had it happen before so it is a lil weird for it to happen how at the same time this weird bug is occuring
Wulferis
WulferisOP16mo ago
When i rewrote the VBO's and stuff i just ripped the stuff from Silk.nets Examples and made some small API Adfustments But even before the adjustments it had the same issue
No description
Wulferis
WulferisOP16mo ago
No description
Kai
Kai16mo ago
My OpenGL is very rusty so bare with me
Wulferis
WulferisOP16mo ago
All g Any help is better then nothing at this point Been stuck on this for a week now
Kai
Kai16mo ago
Ok might be me not understanding OpenGL especially not from the renderdoc trace, but why are there so many vertex attributes?
Kai
Kai16mo ago
this looks normal to me from the offsets I'm guessing you're packing a bunch of info into one big buffer?
Wulferis
WulferisOP16mo ago
Yeah my previous VAO had all attributes in differant buffers this one packs them all into 1
Kai
Kai16mo ago
I see
Wulferis
WulferisOP16mo ago
both had the same issue
Kai
Kai16mo ago
so is this UVs? or what is this
Wulferis
WulferisOP16mo ago
Yeah UVs
Kai
Kai16mo ago
ah found the shader, ok just for reference
Kai
Kai16mo ago
ok so attribute 1-4 are unused but you bind them - that's why it didn't show up in renderdoc at first
Wulferis
WulferisOP16mo ago
yeah atm the shader is just trying to draw a White quad to the screen but vertexPosition only ever gets the first entry inside it the VertexShader sees the Count of vertices and fills them all with -- values in renderdoc only the first actually has content
Kai
Kai16mo ago
? this confuses me - I though the whole problem was that VS only gets the first vertex?
Wulferis
WulferisOP16mo ago
It only gets the Data of the first one the rest appear as empty '--' actually it sees 5 vertices it should be 4
Wulferis
WulferisOP16mo ago
No description
Wulferis
WulferisOP16mo ago
idk if this means anything
Kai
Kai16mo ago
sees
not sure what that's supposed to mean? Like you logged the count in the shader?
Wulferis
WulferisOP16mo ago
the Mesh in RenderDoc has 0,1,2,3,4,5 vertices but only 0 has a position idk what that means
Kai
Kai16mo ago
I see what you mean Thought there was some logging or something you tried
Wulferis
WulferisOP16mo ago
If i try a larger a mesh
No description
Wulferis
WulferisOP16mo ago
its a larger list, this ones a correct count, 0-35 with 36 total vertices
Wulferis
WulferisOP16mo ago
No description
Kai
Kai16mo ago
Yeah I think that count is just taken form drawElements
Wulferis
WulferisOP16mo ago
taht would make sense actually
Kai
Kai16mo ago
Maybe I'm crazy
Wulferis
WulferisOP16mo ago
the Quad is 6 triangles so 0-5
Kai
Kai16mo ago
Is there really 60 bytes in that struct? 3 * 4 + 2 * 4 + 3* 4 + 3* 4 + 3*4 = 56 no? are there 4 extra padding bytes?
Wulferis
WulferisOP16mo ago
Color is 4 floats so 1 extra float
Kai
Kai16mo ago
ah ? says 3 here
Wulferis
WulferisOP16mo ago
Oh typo
Kai
Kai16mo ago
It's right here I doubt it but maybe that's (a) problem?
Wulferis
WulferisOP16mo ago
Yeah didnt fix it I've been testing a lot and changing a lot since this bug appeared I think during my rewrite of the VAO/VBO i may have changed color to 4 floats
Kai
Kai16mo ago
I think this is right?
Wulferis
WulferisOP16mo ago
looks right
Kai
Kai16mo ago
hmm is there supposed to be stride on index buffers? I just really don't know
Wulferis
WulferisOP16mo ago
I imagine so?
Kai
Kai16mo ago
It seems like OpenGL already accounts for type size? So maybe it's supposed to be stride = 0? cause you already give uint as the index type, so it already does 4 bytes at a time? and with stride = 4 skips over the next 4, overflowing the buffer?
Wulferis
WulferisOP16mo ago
I dont think i assign a stride for the index buffer? i assign a Size and the data its just GenBuffer(); and Graphics.GL.BufferData(type, count, data, usage); with a Bind in the middle
Kai
Kai16mo ago
hmm ok was worth a shot 1s I'll be back
Wulferis
WulferisOP16mo ago
DrawArrays with an empty VertexArray, so just pushing vertices and setting them up in a Vertex Shader works fine
Kai
Kai16mo ago
Hmm, tried to reproduce this a few hours ago, but didn't get anywhere... My OpenGL is unfortunately lacking
Want results from more Discord servers?
Add your server