Does the Geometry Shader not accept definable uniforms?
Does the Geometry Shader not accept definable uniforms?
I've been attempting to reduce the amount of input that gets sent to the vertex shader by having the geometry shader handle generating vertices that are a set distance from the single vertex input through the use of uniforms. When using a uniform constant set from within the shader, it works fine, but when I shift it to program code where other uniform functions reside (which are used for the vertex shader) for the designated command list, it displays nothing, even when using the same static values that make up the uniform when it was constant.
Re: Does the Geometry Shader not accept definable uniforms?
Did you take a look at the text.vsh shader in portal3ds? It looks like smea is using a uniform with emitted vertices in the geometry shader.Discostew wrote:I've been attempting to reduce the amount of input that gets sent to the vertex shader by having the geometry shader handle generating vertices that are a set distance from the single vertex input through the use of uniforms. When using a uniform constant set from within the shader, it works fine, but when I shift it to program code where other uniform functions reside (which are used for the vertex shader) for the designated command list, it displays nothing, even when using the same static values that make up the uniform when it was constant.
Re: Does the Geometry Shader not accept definable uniforms?
Took a look at it, and other than a few differences to other things, the actual use of the uniform didn't seem to differ. I then went to examine his gs.c source code, and found out the problem. blargSNES uses an old GPU function of assigning an array of values to a uniform id, which I believe defaults to the vertex shader with no chance of choosing. The newer form allows you to assign whether the uniform gets used for vertex or geometry. I'll see if making the adjustment will work. At the very least, looking over this stuff and making up some adjustment to the overall shader source finally allowed me to use an updated version of aemstro.elhobbs wrote:Did you take a look at the text.vsh shader in portal3ds? It looks like smea is using a uniform with emitted vertices in the geometry shader.Discostew wrote:I've been attempting to reduce the amount of input that gets sent to the vertex shader by having the geometry shader handle generating vertices that are a set distance from the single vertex input through the use of uniforms. When using a uniform constant set from within the shader, it works fine, but when I shift it to program code where other uniform functions reside (which are used for the vertex shader) for the designated command list, it displays nothing, even when using the same static values that make up the uniform when it was constant.
Thanks for pointing me to where I could figure this out.
Seems being able to use uniforms for geometry shaders is a new development, because the version of libctru that comes with devkitARM r44 doesn't have the newer uniform function.
Who is online
Users browsing this forum: No registered users and 0 guests