Chris Pollett > Students > Pundi Muralidharan
[Bio] [Blog] [Deliverable 1 - WebGL Program: The Logic Behind] [Deliverable 2 - The Study of OSM Data and Vector Tiles] [Deliverable 3 - Importing OSM Data into Postgres Database] [Deliverable 4 - Study of Current Tile Generators in Trend] [CS 298 Report-Intermediate - PDF] [CS 298 - Summary of Intermediate Results - PDF] [CS 298 Project Source Code - ZIP] |
The Shaders for WebGL defined in HTMLDescription: This part of the project was to define WebGL shaders that manipulate the vertices, in the HTML script tag. Two shaders, the vertex and the fragment shader are defined and are used to manipulate the vertices.The shaders are defined as follows, in the HTML file: Vertex shader:
<script id="pointVertexShader" type="x-shader/x-vertex">
The vertex shader is used to manipulate the positions of the vertices (lat-lon) points and plot them on the HTML 5 canvas. It also defines the colors for the vertices. Here, I had used yellow color for roads and grey colors for points of interest. Fragment shader:
<script id="pointFragmentShader" type="x-shader/x-fragment">
The fragment shader interpolates the colors between vertices. |