diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-04 10:33:17 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-04 10:33:17 +0200 |
commit | 11d49dcc0a21e74770b1dad9f11916a1cb497a14 (patch) | |
tree | 20fd2d24114bf157776b9bb3b2ec2898440ffa45 /drivers | |
parent | f36dda31856f20b6b8619c4ec12fbb4d0c1f9341 (diff) | |
parent | c8f0f27a0b2a14c00d0cb6fd76eb029915784431 (diff) |
Merge pull request #66858 from clayjohn/GLES3-pix-size
Properly expose TEXTURE_PIXEL_SIZE in Opengl3 renderer
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles3/shaders/canvas.glsl | 4 | ||||
-rw-r--r-- | drivers/gles3/storage/material_storage.cpp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gles3/shaders/canvas.glsl b/drivers/gles3/shaders/canvas.glsl index 7334100575..8dae28b6ef 100644 --- a/drivers/gles3/shaders/canvas.glsl +++ b/drivers/gles3/shaders/canvas.glsl @@ -127,6 +127,8 @@ void main() { } #endif + vec2 color_texture_pixel_size = draw_data[draw_data_instance].color_texture_pixel_size.xy; + #ifdef USE_POINT_SIZE float point_size = 1.0; #endif @@ -393,6 +395,8 @@ void main() { vec2 screen_uv = vec2(0.0); #endif + vec2 color_texture_pixel_size = draw_data[draw_data_instance].color_texture_pixel_size.xy; + vec3 light_vertex = vec3(vertex, 0.0); vec2 shadow_vertex = vertex; diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp index d9a797778c..bbbad50b14 100644 --- a/drivers/gles3/storage/material_storage.cpp +++ b/drivers/gles3/storage/material_storage.cpp @@ -1393,7 +1393,7 @@ MaterialStorage::MaterialStorage() { actions.renames["NORMAL_MAP"] = "normal_map"; actions.renames["NORMAL_MAP_DEPTH"] = "normal_map_depth"; actions.renames["TEXTURE"] = "color_texture"; - actions.renames["TEXTURE_PIXEL_SIZE"] = "draw_data.color_texture_pixel_size"; + actions.renames["TEXTURE_PIXEL_SIZE"] = "color_texture_pixel_size"; actions.renames["NORMAL_TEXTURE"] = "normal_texture"; actions.renames["SPECULAR_SHININESS_TEXTURE"] = "specular_texture"; actions.renames["SPECULAR_SHININESS"] = "specular_shininess"; |