summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLandoUWB <deltasquad451@gmail.com>2023-02-25 23:39:43 -0800
committerYuri Sizov <yuris@humnom.net>2023-03-27 16:51:10 +0200
commitff125a638ad9cdeb72e1bdd889d1fc8b3a8538fd (patch)
tree3f298a9aac84c3313f5be58b9737e020bb4e9b3b /drivers
parent149f16b2fa2259fff81e9222f0bfcf9da7d0af32 (diff)
Commit Fix for GLES3 point size not working
(cherry picked from commit f23f0a27c11334c73b09ce86add8a6511010696f)
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp3
-rw-r--r--drivers/gles3/storage/material_storage.cpp4
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index eb9ca49c5d..b3d6b01c6c 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -2228,6 +2228,9 @@ void RasterizerSceneGLES3::_render_list_template(RenderListParameters *p_params,
}
RS::PrimitiveType primitive = surf->primitive;
+ if (shader->uses_point_size) {
+ primitive = RS::PRIMITIVE_POINTS;
+ }
static const GLenum prim[5] = { GL_POINTS, GL_LINES, GL_LINE_STRIP, GL_TRIANGLES, GL_TRIANGLE_STRIP };
GLenum primitive_gl = prim[int(primitive)];
diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp
index 847ae14041..1736ad1d42 100644
--- a/drivers/gles3/storage/material_storage.cpp
+++ b/drivers/gles3/storage/material_storage.cpp
@@ -1510,7 +1510,7 @@ MaterialStorage::MaterialStorage() {
actions.renames["LIGHT_VERTEX"] = "light_vertex";
actions.renames["SHADOW_VERTEX"] = "shadow_vertex";
actions.renames["UV"] = "uv";
- actions.renames["POINT_SIZE"] = "gl_PointSize";
+ actions.renames["POINT_SIZE"] = "point_size";
actions.renames["MODEL_MATRIX"] = "model_matrix";
actions.renames["CANVAS_MATRIX"] = "canvas_transform";
@@ -1591,7 +1591,7 @@ MaterialStorage::MaterialStorage() {
actions.renames["UV"] = "uv_interp";
actions.renames["UV2"] = "uv2_interp";
actions.renames["COLOR"] = "color_interp";
- actions.renames["POINT_SIZE"] = "gl_PointSize";
+ actions.renames["POINT_SIZE"] = "point_size";
actions.renames["INSTANCE_ID"] = "gl_InstanceID";
actions.renames["VERTEX_ID"] = "gl_VertexID";