The task is to design and implement any interesting effect involving texture animation and combination. You are suggested to use GLSL shader language and optional 1D-2D raster texture. Shape complexity of your displayed scene is not important you should concentrate on texture effect.
C#: Template for the task is prepared in the grcis repository. You can use the 086shader project, there is reasonable GLSL shader setup prepared for you extension and in addition to it there is sample texturing code. One texture is created procedurally (checker color texture enriched by a emboss-like effect). There is also a possibility to load any raster image from disk file and use it as a texture.
C++: You can use template sample09 from the ogl repository. GLSL shaders are initialized in the initGLSL() function, texture computed on CPU is shown in generateTextures() (for texture loaded from file, see sample08, function prepareTextures()).
Texture coordinates: you can use classical approach definig texture coordinates at vertices. Your vertex shader then can modify this primary source and perhaps alter it in some unusual way. Fragment shader can work further with these coordinates. Time dependent computations are recommended.
Time dependency in C#: you should use some high-performance system timer, e.g. DateTime.Now.Ticks to run your simulation smoothly and independent on FPS rate.
Time dependency in C++: at the beginning of the drawGLScene() there is a GLfloat t = frameStat->frameStart(); command providing real time in seconds directly. You should use it to ensure smooth animation independent on current FPS.
C#: In the InitShaderRepository() you can define custom sets of shaders assembled into shader programs. Don't forget to define all handles to uniform variables and assemble all the shader pipelines corectly. Look into the log.txt file for eventual error messages. Current uniform values are set in the RenderScene() just before rendering code (if ( useShaders ) ..).
C++: Definition of the shader set is in the initGLSL() function. You must define all handles to uniform variables and assemble all the shader pipelines corectly. Look into the log.txt file for eventual error messages. Current uniform values are set in the drawGLScene() just before rendering code (if ( shaders ) ..).
Send all your modifications in complete Visual Studio project, including shader files and perhaps larger data files (textures). Write a brief document about your ideas and operating manual.
Hand in before: 7. 5. 2017
Basis: 15 points for functional nontrivial texture animation using fragment shader,
bonuses: up to 8 additional points for your invention,
up to 5 points for 3D scene improvement..
Recommended starting point: Visual Studio project 086shader from the grcis repository (C#) or sample09 from the ogl repository (C++).
Copyright (C) 2005-2017 J. Pelikán, last change: 2019-05-09 17:52:59 +0200 (Thu, 09 May 2019)