fix particle shader datatype
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
3c43bca798
commit
9472a990b4
@ -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);
|
||||||
|
|||||||
@ -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[]{
|
||||||
|
|||||||
@ -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()){
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user