Open Robadob opened 8 years ago
This was in the original OP, I think it has since been fixed in modern Shaders
, but will leave this note here till that's confirmed.
Just noticed some concerns with the buffer binding that will need investigating prior to merging with master.
ShaderCore::setupBindings()
callsglGetProgramResourceIndex()
withd.type
which is presumed to beGL_SHADER_STORAGE_BUFFER
, this isn't a valid value as specified in documentation.It should likely be
GL_SHADER_STORAGE_BLOCK
or potentiallyGL_BUFFER_VARIABLE
.Similarly the call to
glBindBufferBase()
inuseProgram()
is hard coded toGL_SHADER_STORAGE_BUFFER
wherei->second.type
may be more suitable.We should fix this now, before it ends up in a similar place to the now fixed attrib/uniform location/index confusion.
I looked into valve .pcf particle format, it's a complicated mess with resources embedded inside valve archive files, not worth trying to support.
A (currently) non-general implementation now exists in the particles2 branch. This is currently upto date with commit 137 of master, manually merged from the particles branch where the last relevant work was Oct 2016 (before being derailed by starting Assimp in there).
Core tasks remaining for this work:
GL_SHADER_STORAGE_BUFFER
,GL_UNIFORM_BUFFER
, possibly others).uint
/int
/float
data with custom comparison operators. I expect this will require some kind of fancy templatedShaders
upgrade.and one optional task: