fix particle shader datatype
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit

This commit is contained in:
austin 2024-12-24 17:15:21 -05:00
parent 3c43bca798
commit 9472a990b4
5 changed files with 7 additions and 7 deletions

View File

@ -10,7 +10,7 @@ Bind points for different SSBOs
A point light A point light
*/ */
struct ParticleData { struct ParticleData {
mat4 model; dmat4 model;
vec4 color; vec4 color;
vec4 texture; vec4 texture;
}; };
@ -48,7 +48,7 @@ out vec4 instanceColor;
void main() { void main() {
ParticleData currentParticle = particleData[gl_InstanceID]; ParticleData currentParticle = particleData[gl_InstanceID];
mat4 model = currentParticle.model; mat4 model = mat4(currentParticle.model);
//normalize posiiton and normal //normalize posiiton and normal
vec4 FinalVertex = vec4(aPos, 1.0); vec4 FinalVertex = vec4(aPos, 1.0);

View File

@ -96,7 +96,7 @@ public class ParticleService extends SignalServiceImpl {
boolean rVal = false; boolean rVal = false;
switch(signal.getType()){ switch(signal.getType()){
case RENDERING_ENGINE_READY: { case RENDERING_ENGINE_READY: {
modelAttrib = new ShaderAttribute("model", HomogenousBufferTypes.MAT4F); modelAttrib = new ShaderAttribute("model", HomogenousBufferTypes.MAT4D);
colorAttrib = new ShaderAttribute("color", HomogenousBufferTypes.VEC4F); colorAttrib = new ShaderAttribute("color", HomogenousBufferTypes.VEC4F);
textureAttrib = new ShaderAttribute("texture", HomogenousBufferTypes.VEC4F); textureAttrib = new ShaderAttribute("texture", HomogenousBufferTypes.VEC4F);
List<ShaderAttribute> types = Arrays.asList(new ShaderAttribute[]{ List<ShaderAttribute> types = Arrays.asList(new ShaderAttribute[]{

View File

@ -97,7 +97,7 @@ public class HomogenousInstanceData implements InstanceData {
attributeCpuBufferMap.put(shaderAttribute, BufferUtils.createFloatBuffer(capacity * 4 * 4)); attributeCpuBufferMap.put(shaderAttribute, BufferUtils.createFloatBuffer(capacity * 4 * 4));
} break; } break;
case MAT4D: { case MAT4D: {
attributeCpuBufferMap.put(shaderAttribute, BufferUtils.createFloatBuffer(capacity * 4 * 4)); attributeCpuBufferMap.put(shaderAttribute, BufferUtils.createFloatBuffer(capacity * 4 * 8));
} break; } break;
} }
if(shaderAttribute.isSingleIndex()){ if(shaderAttribute.isSingleIndex()){

View File

@ -120,7 +120,7 @@ public class HomogenousInstancedArray {
return capacity * 4 * 4 * 4; return capacity * 4 * 4 * 4;
} }
case MAT4D: { case MAT4D: {
return capacity * 4 * 4 * 4; return capacity * 4 * 4 * 8;
} }
} }
return 0; return 0;

View File

@ -113,7 +113,7 @@ public class HomogenousUniformBuffer {
return capacity * 4 * 4 * 4; return capacity * 4 * 4 * 4;
} }
case MAT4D: { case MAT4D: {
return capacity * 4 * 4 * 4; return capacity * 4 * 4 * 8;
} }
} }
return 0; return 0;
@ -150,7 +150,7 @@ public class HomogenousUniformBuffer {
return 4 * 4 * 4; return 4 * 4 * 4;
} }
case MAT4D: { case MAT4D: {
return 4 * 4 * 4; return 4 * 4 * 8;
} }
} }
return 0; return 0;