ES2 support: filament and filamat changes
This CL contains two parts: - changes to matc/filamat - changes to filament itself Filamat can now generate ES2 compatible shaders. Only the unlit variant is supported. Fog and picking are supported as well. post-processing, skinning, instancing, all lighting and shadowing are not supported. Filament is updated to not issue commands that are not supported in ES2. Addtionnally, the hello-triangle sample is updated to work on an ES2 device.
This commit is contained in:
committed by
Mathias Agopian
parent
7cddd832aa
commit
b4d842c342
@@ -524,6 +524,12 @@ void GLSLPostProcessor::fullOptimization(const TShader& tShader,
|
||||
glslOptions.fragment.default_int_precision = glslOptions.es ?
|
||||
CompilerGLSL::Options::Precision::Mediump : CompilerGLSL::Options::Precision::Highp;
|
||||
|
||||
// TODO: this should be done only on the "feature level 0" variant
|
||||
if (config.featureLevel == 0) {
|
||||
// convert UBOs to plain uniforms if we're at feature level 0
|
||||
glslOptions.emit_uniform_buffer_as_plain_uniforms = true;
|
||||
}
|
||||
|
||||
CompilerGLSL glslCompiler(std::move(spirv));
|
||||
glslCompiler.set_common_options(glslOptions);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user