Some fixes for shaders and WebGL2
Add padding to UBO data to be multiple of 16 bytes Add precision definition for samplers Replace texture2D (deprecated) with texture in shaders
This commit is contained in:
parent
f863c0ca14
commit
9b9a723c77
4 changed files with 12 additions and 2 deletions
|
|
@ -273,6 +273,9 @@ ShaderGLES3::Version *ShaderGLES3::get_current_version() {
|
|||
//vertex precision is high
|
||||
strings.push_back("precision highp float;\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 (cc) {
|
||||
|
|
@ -371,6 +374,9 @@ ShaderGLES3::Version *ShaderGLES3::get_current_version() {
|
|||
//fragment precision is medium
|
||||
strings.push_back("precision highp float;\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 (cc) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue