From 28d92dc68b918c230403643b22c741c2c4205ce2 Mon Sep 17 00:00:00 2001 From: Filippo Scognamiglio Date: Wed, 28 Jan 2015 11:14:42 +0100 Subject: [PATCH] Remove default precision on non ES platforms. --- app/qml/PreprocessedTerminal.qml | 5 ++++- app/qml/ShaderTerminal.qml | 4 +++- app/qml/frames/utils/TerminalFrame.qml | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/qml/PreprocessedTerminal.qml b/app/qml/PreprocessedTerminal.qml index 1ac6088..f1ecfdb 100644 --- a/app/qml/PreprocessedTerminal.qml +++ b/app/qml/PreprocessedTerminal.qml @@ -312,7 +312,10 @@ Item{ blending: false fragmentShader: - "precision highp float;" + + "#ifdef GL_ES + precision mediump float; + #endif\n" + + "uniform lowp float qt_Opacity;" + "uniform lowp sampler2D txt_source;" + diff --git a/app/qml/ShaderTerminal.qml b/app/qml/ShaderTerminal.qml index a0c1903..5040cb2 100644 --- a/app/qml/ShaderTerminal.qml +++ b/app/qml/ShaderTerminal.qml @@ -151,7 +151,9 @@ ShaderEffect { }" fragmentShader: " - precision highp float; + #ifdef GL_ES + precision mediump float; + #endif uniform sampler2D source; uniform highp float qt_Opacity; diff --git a/app/qml/frames/utils/TerminalFrame.qml b/app/qml/frames/utils/TerminalFrame.qml index ae4f084..f47f540 100644 --- a/app/qml/frames/utils/TerminalFrame.qml +++ b/app/qml/frames/utils/TerminalFrame.qml @@ -120,7 +120,9 @@ Item{ blending: true fragmentShader: " - precision highp float; + #ifdef GL_ES + precision mediump float; + #endif uniform highp sampler2D normals; uniform highp sampler2D source;