-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Blender 2.8x] Add option to set OpenGL point size for particle debugging #484
Comments
Hi PavelBlend, Thanks for the report! We had to remove the option to set pointsize for Blender 2.8x. The addon uses the new Blender 2.8x drawing system which uses the Here is a code snippet of the shaders that we're using in Blender 2.8x: vertex_shader = """
uniform mat4 ModelViewProjectionMatrix;
uniform float pointsize;
in vec3 pos;
in vec4 color;
out vec4 finalColor;
void main()
{
gl_PointSize = pointsize;
gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
finalColor = color;
}
"""
fragment_shader = """
in vec4 finalColor;
out vec4 fragColor;
void main()
{
fragColor = finalColor;
}
"""
particle_shader = gpu.types.GPUShader(vertex_shader, fragment_shader)
particle_shader.uniform_float('pointsize', dprops.debug.particle_size)
particle_batch_draw = batch_for_shader(
particle_shader, 'POINTS',
{"pos": particle_vertices, "color": particle_vertex_colors},
) We are setting the OpenGL pointsize in the shader with |
Everything works in my jet fluids addon: |
Thank you so much for the tip! This fixes the problem. I did not know the bgl module would work like this. I have added this fix to the addon. If you would like to add this fix to your installation, unzip the following file: And replace the scripts at these locations:
|
System Information
Blender Version (including hash): 2.81 (sub 16), branch: master, commit date: 2019-12-04 11:32, hash:
rBf1aa4d18d49d
FLIP Fluids Version: 1.0.7
Operating System: Windows 7 64 bit
CPU: AMD A8 5600K
GFX: -
RAM: 8 GB
Describe the bug
Particle Size (Debug Panel) has disappeared in Blender 2.81.
Expected Behaviour
You can do it as follows:
bgl.glPointSize(particle_size)
Actual Behaviour
There is no way to specify the particle size.
The text was updated successfully, but these errors were encountered: