/** * Varying variables provide the interface between the vertex shaders, the fragment shaders, and the fixed * functionality between them. Vertex shaders will compute values per vertex (such as color, texture * coordinates, etc.) and write them to variables declared with the varying qualifier. A vertex shader may * also read varying variables, getting back the same values it has written. Reading a varying variable in a * vertex shader returns undefined values if it is read before being written. * * @param var A global shader variable * @param index The index for the shader variable. This number will appear suffixed in the final shader string. * @return */ protected ShaderVar addVarying(IGlobalShaderVar var, int index) { return addVarying(var.getVarString() + Integer.toString(index), var.getDataType()); }
/** * Varying variables provide the interface between the vertex shaders, the fragment shaders, and the fixed * functionality between them. Vertex shaders will compute values per vertex (such as color, texture * coordinates, etc.) and write them to variables declared with the varying qualifier. A vertex shader may * also read varying variables, getting back the same values it has written. Reading a varying variable in a * vertex shader returns undefined values if it is read before being written. * * @param var * @return */ protected ShaderVar addVarying(IGlobalShaderVar var) { return addVarying(var.getVarString(), var.getDataType()); }
/** * Varying variables provide the interface between the vertex shaders, the fragment shaders, and the fixed * functionality between them. Vertex shaders will compute values per vertex (such as color, texture * coordinates, etc.) and write them to variables declared with the varying qualifier. A vertex shader may * also read varying variables, getting back the same values it has written. Reading a varying variable in a * vertex shader returns undefined values if it is read before being written. * * @param var A global shader variable * @param index The index for the shader variable. This number will appear suffixed in the final shader string. * @return */ protected ShaderVar addVarying(IGlobalShaderVar var, int index) { return addVarying(var.getVarString() + Integer.toString(index), var.getDataType()); }
/** * Varying variables provide the interface between the vertex shaders, the fragment shaders, and the fixed * functionality between them. Vertex shaders will compute values per vertex (such as color, texture * coordinates, etc.) and write them to variables declared with the varying qualifier. A vertex shader may * also read varying variables, getting back the same values it has written. Reading a varying variable in a * vertex shader returns undefined values if it is read before being written. * * @param var * @return */ protected ShaderVar addVarying(IGlobalShaderVar var) { return addVarying(var.getVarString(), var.getDataType()); }