GLSL to GLSL ES translation

how do you translate “in” and “out” parameters from GLSL to GLSL ES ?
since i wanna port some GLSL shaders into GLSL ES

GLSL #version 330 -> GLSL ES:

vertex shader “in” -> “attribute”
vertex shader “out” -> “varying”
fragment shader “in” -> “varying”

thank you, what about fragment shader “out” ?

You need to write to the built in variables (eg. gl_FragColor)

one thing you will also need to pay very serious attention to is precision qualifiers. On most embedded devices, choosing incorrect precision qualifies can have dramatically bad consequences in terms of performance and/or render quality.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.