www.xbdev.net
xbdev - software development
Friday March 14, 2025
Home | Contact | Support | ShaderX.. Making our graphics card work for us..
     
 

ShaderX..

Making our graphics card work for us..

 

Shaders - Simple 3 - Let there be light

by bkenwright@xbdev.net



Minimal working shader assembly program (vertex shader assembly).

// code_1.vsh
vs.1.0

// Transform our coordinates
m4x4             oPos,    v0,    c0    // v0-Input coordinates

// Simple Lighting Calculation
dp3               r0,         v3,    c4

mul               oD0
,      r0.x,  v5


The simple example uses the vertex register (v0,v3) and the constant registers (c4) to calculate simple dlighting (dot product).


Resources & Links


Details for the registers/layout shader assembly





 
Advert (Support Website)

 
 Visitor:
Copyright (c) 2002-2025 xbdev.net - All rights reserved.
Designated articles, tutorials and software are the property of their respective owners.