Tag Info

New answers tagged

1

It turns out it was the Mesh creation and the shader was working fine. In my above example vertices are shared between different tiles, below vertices are only shared between the 2 triangles that make each tile. void BuildMesh() { Vector3[] vertices = new Vector3[(int) mapSize.x * (int) mapSize.y * 4]; Vector3[] normals = new ...


1

The answer is spread across the following links. Due to size constraints / requirements it had to be a Buffer Texture. Overview listing of possible technologies: http://stackoverflow.com/questions/7954927/glsl-passing-a-list-of-values-to-fragment-shader OpenGL reference to Buffer Texture: https://www.opengl.org/wiki/Buffer_Texture Different question but ...


2

When uploading shader source, you may provide more than one string. The lines of the strings are concatenated into the full text source for the shader compiler. You can thus emulate an include system (poorly) by putting the text of the required sources before the string with the main shader source. This is the origin of the numbers before the line numbers ...



Top 50 recent answers are included