Presentation is loading. Please wait.

Presentation is loading. Please wait.

Current Student – University of Wisconsin – Stout Applied Mathematics and Computer Science: Software Development Associate Degree in Computer Programming.

Similar presentations


Presentation on theme: "Current Student – University of Wisconsin – Stout Applied Mathematics and Computer Science: Software Development Associate Degree in Computer Programming."— Presentation transcript:

1

2 Current Student – University of Wisconsin – Stout Applied Mathematics and Computer Science: Software Development Associate Degree in Computer Programming – Northcentral Technical College Avid Gamer / Game Programmer – Gamer since age 5 – Worked with XNA, DirectX, VB (yes I wrote a game in VB 6.0)

3 High Level Shader Language (HLSL) – Developed for DirectX but used in all traditional graphical APIs DirectX 8.0 C-style language used to manipulate graphics – Vertex Shaders – Pixel Shaders – Geometry Shaders (not covered)

4 Make things pretty! – More Realistic Shaders make use of graphics hardware and allow the CPU to be free of the majority of graphical calculations done on the GPU “Fixed” pipeline (lighting without shaders) is being phased out – XNA’s BasicEffect

5 Manipulate vertices – Position, color, etc…

6 Manipulate each pixel – Lighting, bump mapping, post-processing

7 How are shaders processed?

8 World Transformation – Transform from model coordinates to 3D world coordinates (position, rotation, scale) View Transformation – Transform the world to align with the camera or ‘eye’ viewing the world Projection Transformation – Convert 3D objects to 2D screen space World*View*Projection Transformation Matrix

9 A point light is a light source sending light out from the center – 2D: Circle – 3D: Sphere Examples – Sun – Light bulb – Almost any light

10 1.Determine all transformations 2.Have light travel in a specific direction 3.Light contacts surface Light surface based on distance and brightness Blend light color with surface color/ material

11 Brightness of a surface is determined by the angle of the light versus the normal of the surface (note: Surface Normal )Surface Normal – Direct light (light directed at normal) yields a brighter surface – Perpendicular light and normal yields no light applied Illumination = cos(theta) * brightness – Where theta is the angle between the surface normal and direction of the light Cos(90) = 0

12 Attenuation is the speed at which a light’s intensity decreases (further away receives less intense light) While Attenuation deals with distance, a light’s falloff is the loss of intensity from the center of a light source (this slide has a falloff)

13 General Idea of a Material – Clear layer sitting on top of an object (may be colored) defining how a surface reflects light Light on Surface = Illumination * Material Info * Attenuation Material Info includes: – Diffuse – Non-shiny, reflective light (concrete) – Ambient – Reflective ambient light (all-world light) – Specular – Shiny, reflective light (apple) – Emissive – Light the object emits (crystal)

14 Effect File (.fx) DirectX 9.0c

15 HLSL DirectX Gaming

16


Download ppt "Current Student – University of Wisconsin – Stout Applied Mathematics and Computer Science: Software Development Associate Degree in Computer Programming."

Similar presentations


Ads by Google