You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Fixes and optimizations to mobile renderer
* Only apply final actions to attachments used in the last pass. * Fixes to draw list final action (was using continue instead of read/drop). * Profiling regions inside draw lists now properly throw errors. * Ability to enable gpu profile printing from project settings. (used to debug).
This commit is contained in:
@@ -59,27 +59,27 @@ layout(location = 11) in vec4 weight_attrib;
|
||||
|
||||
/* Varyings */
|
||||
|
||||
layout(location = 0) out vec3 vertex_interp;
|
||||
layout(location = 0) highp out vec3 vertex_interp;
|
||||
|
||||
#ifdef NORMAL_USED
|
||||
layout(location = 1) out vec3 normal_interp;
|
||||
layout(location = 1) mediump out vec3 normal_interp;
|
||||
#endif
|
||||
|
||||
#if defined(COLOR_USED)
|
||||
layout(location = 2) out vec4 color_interp;
|
||||
layout(location = 2) mediump out vec4 color_interp;
|
||||
#endif
|
||||
|
||||
#ifdef UV_USED
|
||||
layout(location = 3) out vec2 uv_interp;
|
||||
layout(location = 3) mediump out vec2 uv_interp;
|
||||
#endif
|
||||
|
||||
#if defined(UV2_USED) || defined(USE_LIGHTMAP)
|
||||
layout(location = 4) out vec2 uv2_interp;
|
||||
layout(location = 4) mediump out vec2 uv2_interp;
|
||||
#endif
|
||||
|
||||
#if defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED)
|
||||
layout(location = 5) out vec3 tangent_interp;
|
||||
layout(location = 6) out vec3 binormal_interp;
|
||||
layout(location = 5) mediump out vec3 tangent_interp;
|
||||
layout(location = 6) mediump out vec3 binormal_interp;
|
||||
#endif
|
||||
|
||||
#ifdef MATERIAL_UNIFORMS_USED
|
||||
@@ -370,6 +370,10 @@ void main() {
|
||||
|
||||
#VERSION_DEFINES
|
||||
|
||||
//use medium precision for floats on mobile.
|
||||
|
||||
precision mediump float;
|
||||
|
||||
/* Specialization Constants */
|
||||
|
||||
/* Specialization Constants (Toggles) */
|
||||
@@ -395,32 +399,32 @@ layout(constant_id = 11) const bool sc_projector_use_mipmaps = true;
|
||||
|
||||
/* Varyings */
|
||||
|
||||
layout(location = 0) in vec3 vertex_interp;
|
||||
layout(location = 0) highp in vec3 vertex_interp;
|
||||
|
||||
#ifdef NORMAL_USED
|
||||
layout(location = 1) in vec3 normal_interp;
|
||||
layout(location = 1) mediump in vec3 normal_interp;
|
||||
#endif
|
||||
|
||||
#if defined(COLOR_USED)
|
||||
layout(location = 2) in vec4 color_interp;
|
||||
layout(location = 2) mediump in vec4 color_interp;
|
||||
#endif
|
||||
|
||||
#ifdef UV_USED
|
||||
layout(location = 3) in vec2 uv_interp;
|
||||
layout(location = 3) mediump in vec2 uv_interp;
|
||||
#endif
|
||||
|
||||
#if defined(UV2_USED) || defined(USE_LIGHTMAP)
|
||||
layout(location = 4) in vec2 uv2_interp;
|
||||
layout(location = 4) mediump in vec2 uv2_interp;
|
||||
#endif
|
||||
|
||||
#if defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED)
|
||||
layout(location = 5) in vec3 tangent_interp;
|
||||
layout(location = 6) in vec3 binormal_interp;
|
||||
layout(location = 5) mediump in vec3 tangent_interp;
|
||||
layout(location = 6) mediump in vec3 binormal_interp;
|
||||
#endif
|
||||
|
||||
#ifdef MODE_DUAL_PARABOLOID
|
||||
|
||||
layout(location = 8) in float dp_clip;
|
||||
layout(location = 8) highp in float dp_clip;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user