Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
SWE
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gaurav Kukreja
SWE
Commits
4536f332
Commit
4536f332
authored
Oct 11, 2012
by
Sebastian Rettenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing shader file
parent
cf57f79e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
vertex.glsl
src/opengl/vertex.glsl
+41
-0
No files found.
src/opengl/vertex.glsl
0 → 100644
View file @
4536f332
// =====================================================================
// This file is part of SWE_CUDA (see file SWE_Block.cu for details).
//
// Copyright (C) 2010,2011 Tobias Schnabel
//
// SWE_CUDA is free software: you can redristribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// SWE_CUDA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SWE_CUDA. If not, see <http://www.gnu.org/licenses/>.
// =====================================================================
varying
vec3
N
;
varying
vec3
V
;
varying
vec4
ambient
;
/* Shading of water surfaces with fresnel effect */
void
main
()
{
// Compute properties of the light source
ambient
=
gl_FrontMaterial
.
ambient
*
gl_LightSource
[
0
].
ambient
;
ambient
+=
gl_LightModel
.
ambient
*
gl_FrontMaterial
.
ambient
;
// Transform our normal into eye space
N
=
normalize
(
gl_NormalMatrix
*
gl_Normal
);
// Calculate vector from vertex to the eye,
// which resides at (0,0,0)
V
=
-
vec3
(
gl_ModelViewMatrix
*
gl_Vertex
);
// Compute vertex position via internal transform function
gl_Position
=
ftransform
();
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment