Kisak-Strike icon indicating copy to clipboard operation
Kisak-Strike copied to clipboard

togl: use PBO instead glGetTexImage

Open nillerusr opened this issue 2 years ago • 22 comments

nillerusr avatar Oct 01 '22 16:10 nillerusr

That should help with dlights

nillerusr avatar Oct 01 '22 16:10 nillerusr

2022-10-01-104933_4480x1440_scrot

oy I think I broke it, the dlights still work tho. Did u make any more changes elsewhere? I didn't get the header file in the commit

LWSS avatar Oct 01 '22 17:10 LWSS

yeah if I put kGLMTexDynamic onto more types, it seems to work but it breaks the net_graph text

LWSS avatar Oct 01 '22 18:10 LWSS

Well i forget header file yes

nillerusr avatar Oct 01 '22 18:10 nillerusr

yeah i figured those out but I get black textures after dlights occur unless I put dynamic on every texture(and then the vgui fonts break)

LWSS avatar Oct 01 '22 18:10 LWSS

yeah i figured those out but I get black textures after dlights occur unless I put dynamic on every texture(and then the vgui fonts break)

Lol what

nillerusr avatar Oct 01 '22 18:10 nillerusr

Don't do that

nillerusr avatar Oct 01 '22 18:10 nillerusr

yeah i wasn't gonna, just testing something

LWSS avatar Oct 01 '22 18:10 LWSS

Hmm maybe that's only csgo problem. I don't have problems like that in css/hl2

nillerusr avatar Oct 01 '22 18:10 nillerusr

Well, in csgo lightmaps are updated in the same way as in css. Maybe the implementation of togl is changed somewhere

nillerusr avatar Oct 01 '22 18:10 nillerusr

image LoL

nillerusr avatar Oct 01 '22 19:10 nillerusr

weed-vision

LWSS avatar Oct 01 '22 19:10 LWSS

Well, I needed to rebuild everything to which togl links. image

nillerusr avatar Oct 01 '22 19:10 nillerusr

yo for some reason in csgo there's like 2-3 different versions of this glm code.

The enums don't even match :skull:

https://github.com/SwagSoftware/Kisak-Strike/blob/master/public/togl/cglmtex.h#L96

https://github.com/SwagSoftware/Kisak-Strike/blob/master/public/glmgr/cglmtex.h#L79

yeah they're unused though, didn't fix anything

LWSS avatar Oct 01 '22 19:10 LWSS

Hmm try to run with -gl_debug

nillerusr avatar Oct 01 '22 20:10 nillerusr

Oops maybe that's my fault. I found funny bug image

nillerusr avatar Oct 01 '22 20:10 nillerusr

For textures locked with D3DLOCK_READONLY flag must be used old reading method, well

nillerusr avatar Oct 01 '22 20:10 nillerusr

didn't seem to be the issue for me. I'll mess with it later

LWSS avatar Oct 01 '22 22:10 LWSS

Testing FPS drop (by setting all textures to dynamic to get this to work), it seems to work really good, there's basically no drop with my 4 dlight test at 300fps cap.

LWSS avatar Oct 01 '22 23:10 LWSS

2022-10-01-162750_4480x1440_scrot

bro why are there some walls that are just immune to dlights? (Even with regular code). I swear this game is so jank. Probably some random wall texture flag?

The main problem with CS:GO is that the asset-pipeline sucks major nuts. Redo'ing that is also a lot of work, but hammer should just be dumpster'd and we make a trenchbroom mod or something

LWSS avatar Oct 01 '22 23:10 LWSS

I have an idea. Try to build this for csgo https://github.com/nillerusr/source-engine/tree/master/togles It uses OpenGLES 3.2( and can work opengl 3.2 core context )

nillerusr avatar Oct 02 '22 17:10 nillerusr

I have an idea. Try to build this for csgo https://github.com/nillerusr/source-engine/tree/master/togles It uses OpenGLES 3.2( and can work opengl 3.2 core context )

was this ever attempted?

blackletum avatar Feb 01 '24 00:02 blackletum