Refactor stereo build flags and configs (#7857)
- Add option to build.sh to build for paritcular stereo techniques (default to NONE). Only applies to samples. - Consoldiate viewer checkbox for debugging stereo rendering - Add DriverConfig flag for stereoscopic type so that it can be used to determine availability of the feature and (to be completed) enable corresponding GPU features. Co-authored-by: Mathias Agopian <mathias@google.com>
This commit is contained in:
co-authored by
Mathias Agopian
parent
ab12984912
commit
a9f3971989
@@ -539,15 +539,16 @@ bool GLSLPostProcessor::fullOptimization(const TShader& tShader,
|
||||
|
||||
if (config.variant.hasStereo() && config.shaderType == ShaderStage::VERTEX) {
|
||||
switch (config.materialInfo->stereoscopicType) {
|
||||
case StereoscopicType::INSTANCED:
|
||||
// Nothing to generate
|
||||
break;
|
||||
case StereoscopicType::MULTIVIEW:
|
||||
// For stereo variants using multiview feature, this generates the shader code below.
|
||||
// #extension GL_OVR_multiview2 : require
|
||||
// layout(num_views = 2) in;
|
||||
glslOptions.ovr_multiview_view_count = config.materialInfo->stereoscopicEyeCount;
|
||||
break;
|
||||
case StereoscopicType::INSTANCED:
|
||||
case StereoscopicType::NONE:
|
||||
// Nothing to generate
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user