How can I create a shader that will reproduce this lighting effect on terrain?


Notice the way in which the major light source in each image reflects
off the ground, as a function of the distance between the light source
and the viewer (?).Is this a (bumped) specular map? The effect is seen
all over in World of Warcraft; I specifically remember it on the snow
in Dun Morogh, and on the shores of Darrowmere lake. Looking directly
toward the sun is required. The effect is also commonly on the surface
of water in RL and in CG. Specifically, I want to build the effect
wher

The Orange book, section 16.2, lists implementing diffuse lighting
as:


void main()
{
vec3 N =
normalize(gl_NormalMatrix * gl_Normal);
vec4 V =
gl_ModelViewMatrix * gl_vertex;
vec3 L = normalize(lightPos -
V.xyz);
gl_FrontColor = gl_Color * vec4(max(0.0, dot(N, L)); />}

However, when I run this, the lighting
changes when I move my camera.
On the other hand, when I
change


vec3 N = normalize(gl_NormalMatrix *
gl_Normal);

to
vec3 N =
normalize(gl_Normal);


I get diffuse lighting that works
like the fixed pipe

Development Tools & Services

So lately i've took my first serious steps (or at least i think so)
into opengl/glsl and shaders in general.
Ive managed to construct
and render VBOs, create and compile shaders and also mess with them in
some sort of way.
I'm using a vertex shader to fix my opengl view
(correct the aspect ratio) and also perform animation. This is
achieved with varius matrix manipulations.


One would ask
why am i using vertex shaders for animation, but reading articles
around the globe i got the impression it's best to maintain static
VBOs rather updating them constantly. Some sort of GPU>CPU battle. />Now i may be wrong about it that's why im reaching here for aid on t

Web Design

I have created a Css class which defines the opacity of my image
but I need to access it in JavaScript and change it in a for loop then
pass the new opacity back to a variable and repeat the process until I
have the opacity I want which is 100%.


I need this to be
triggered by the onmouseover event handler. Can anyone show me some
code so I know how its done?


css in my external
stylesheet:


.test{
opacity:0.4; />filter:alpha(opacity=40); /* For IE8 and earlier */
} />
Web Design

Trying to learn shaders and get a dead simple directional light
source working but I just get black. If I return input.Col all is fine
so I know it's something to do with these normal calcs but have
absolutely no idea what is wrong? I'm struggling to understand shaders
and specifically where to get/set matWorld from or what it should be
(I tried just setting it to the Identity matrix) or if it's something
that magically gets set by itself. worldViewProj I'm setting from
code


float4 vecLightDir = normalize(float4(1.0f, 1.0f,
1.0f,0.0f));
float4x4 worldViewProj : WORLDVIEWPROJECTION; />float4x4 matWorld : WORLD;
struct VS_IN
{
fl
Programming Languages

In this image below...
you can see the left edge is
rounded. In Photoshop CS4, how can I apply that lighting effect to a
similar texture to create the effect of a rounded edge?
Thanks so
much in advance for all your help!
Web Design
Notice the way in which the major light source in each image reflects
off the ground, as a function of the distance between the light source
and the viewer (?).Is this a (bumped) specular map? The effect is seen
all over in World of Warcraft; I specifically remember it on the snow
in Dun Morogh, and on the shores of Darrowmere lake. Looking directly
toward the sun is required. The effect is also commonly on the surface
of water in RL and in CG. Specifically, I want to build the effect
wher
Game Development

- Technology - Languages
+ Webmasters
+ Development
+ Development Tools
+ Internet
+ Mobile Programming
+ Linux
+ Unix
+ Apple
+ Ubuntu
+ Mobile & Tablets
+ Databases
+ Android
+ Network & Servers
+ Operating Systems
+ Coding
+ Design Software
+ Web Development
+ Game Development
+ Access
+ Excel
+ Web Design
+ Web Hosting
+ Web Site Reviews
+ Domain Name
+ Information Security
+ Software
+ Computers
+ Electronics
+ Hardware
+ Windows
+ PHP
+ ASP/ASP.Net
+ C/C++/C#
+ VB/VB.Net
+ JAVA
+ Javascript
+ Programming
Privacy Policy - Copyrights Notice - Feedback - Report Violation 2018 © BigHow