You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Merge pull request #10257 from Faless/html5_fixes
Fix for WebGL2 and HTML5 export
This commit is contained in:
@@ -42,6 +42,7 @@ public:
|
|||||||
|
|
||||||
float projection_matrix[16];
|
float projection_matrix[16];
|
||||||
float time;
|
float time;
|
||||||
|
uint8_t padding[12];
|
||||||
};
|
};
|
||||||
|
|
||||||
RasterizerSceneGLES3 *scene_render;
|
RasterizerSceneGLES3 *scene_render;
|
||||||
@@ -102,6 +103,7 @@ public:
|
|||||||
float light_height;
|
float light_height;
|
||||||
float light_outside_alpha;
|
float light_outside_alpha;
|
||||||
float shadow_distance_mult;
|
float shadow_distance_mult;
|
||||||
|
uint8_t padding[4];
|
||||||
} ubo_data;
|
} ubo_data;
|
||||||
|
|
||||||
GLuint ubo;
|
GLuint ubo;
|
||||||
|
|||||||
@@ -141,6 +141,7 @@ public:
|
|||||||
float fog_height_min;
|
float fog_height_min;
|
||||||
float fog_height_max;
|
float fog_height_max;
|
||||||
float fog_height_curve;
|
float fog_height_curve;
|
||||||
|
uint8_t padding[8];
|
||||||
|
|
||||||
} ubo_data;
|
} ubo_data;
|
||||||
|
|
||||||
@@ -150,6 +151,7 @@ public:
|
|||||||
|
|
||||||
float transform[16];
|
float transform[16];
|
||||||
float ambient_contribution;
|
float ambient_contribution;
|
||||||
|
uint8_t padding[12];
|
||||||
|
|
||||||
} env_radiance_data;
|
} env_radiance_data;
|
||||||
|
|
||||||
|
|||||||
@@ -273,6 +273,9 @@ ShaderGLES3::Version *ShaderGLES3::get_current_version() {
|
|||||||
//vertex precision is high
|
//vertex precision is high
|
||||||
strings.push_back("precision highp float;\n");
|
strings.push_back("precision highp float;\n");
|
||||||
strings.push_back("precision highp int;\n");
|
strings.push_back("precision highp int;\n");
|
||||||
|
strings.push_back("precision highp sampler2D;\n");
|
||||||
|
strings.push_back("precision highp samplerCube;\n");
|
||||||
|
strings.push_back("precision highp sampler2DArray;\n");
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (cc) {
|
if (cc) {
|
||||||
@@ -371,6 +374,9 @@ ShaderGLES3::Version *ShaderGLES3::get_current_version() {
|
|||||||
//fragment precision is medium
|
//fragment precision is medium
|
||||||
strings.push_back("precision highp float;\n");
|
strings.push_back("precision highp float;\n");
|
||||||
strings.push_back("precision highp int;\n");
|
strings.push_back("precision highp int;\n");
|
||||||
|
strings.push_back("precision highp sampler2D;\n");
|
||||||
|
strings.push_back("precision highp samplerCube;\n");
|
||||||
|
strings.push_back("precision highp sampler2DArray;\n");
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (cc) {
|
if (cc) {
|
||||||
|
|||||||
@@ -532,11 +532,11 @@ FRAGMENT_SHADER_CODE
|
|||||||
|
|
||||||
#ifdef USE_RGBA_SHADOWS
|
#ifdef USE_RGBA_SHADOWS
|
||||||
|
|
||||||
#define SHADOW_DEPTH(m_tex,m_uv) dot(texture2D((m_tex),(m_uv)),vec4(1.0 / (256.0 * 256.0 * 256.0),1.0 / (256.0 * 256.0),1.0 / 256.0,1) )
|
#define SHADOW_DEPTH(m_tex,m_uv) dot(texture((m_tex),(m_uv)),vec4(1.0 / (256.0 * 256.0 * 256.0),1.0 / (256.0 * 256.0),1.0 / 256.0,1) )
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define SHADOW_DEPTH(m_tex,m_uv) (texture2D((m_tex),(m_uv)).r)
|
#define SHADOW_DEPTH(m_tex,m_uv) (texture((m_tex),(m_uv)).r)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ IP_Address IP_Unix::_resolve_hostname(const String &p_hostname, Type p_type) {
|
|||||||
hints.ai_family = AF_UNSPEC;
|
hints.ai_family = AF_UNSPEC;
|
||||||
hints.ai_flags = AI_ADDRCONFIG;
|
hints.ai_flags = AI_ADDRCONFIG;
|
||||||
};
|
};
|
||||||
|
hints.ai_flags &= !AI_NUMERICHOST;
|
||||||
|
|
||||||
int s = getaddrinfo(p_hostname.utf8().get_data(), NULL, &hints, &result);
|
int s = getaddrinfo(p_hostname.utf8().get_data(), NULL, &hints, &result);
|
||||||
if (s != 0) {
|
if (s != 0) {
|
||||||
|
|||||||
@@ -1466,6 +1466,7 @@ bool Main::start() {
|
|||||||
String iconpath = GLOBAL_DEF("application/config/icon", "Variant()");
|
String iconpath = GLOBAL_DEF("application/config/icon", "Variant()");
|
||||||
if (iconpath != "") {
|
if (iconpath != "") {
|
||||||
Ref<Image> icon;
|
Ref<Image> icon;
|
||||||
|
icon.instance();
|
||||||
if (icon->load(iconpath) == OK)
|
if (icon->load(iconpath) == OK)
|
||||||
OS::get_singleton()->set_icon(icon);
|
OS::get_singleton()->set_icon(icon);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user