Hi guys,
I'm finding myself wanting to port a standard shininess exponent over to the shininess table, what's the formula I should be applying? (what does each location in the table represent - what are the lookup factors?)
Many thanks
Shininess Table
Re: Shininess Table
i am a little disturbed that you havent looked for it in gbatek yet:
But I believe gbatek is wrong,
http://desmume.svn.sourceforge.net/view ... iew=markup (line 1179) gives me better results
Code: Select all
IF TexCoordTransformMode=2 THEN TexCoord=NormalVector*Matrix (see TexCoord)
NormalVector=NormalVector*DirectionalMatrix
VertexColor = EmissionColor
FOR i=0 to 3
IF PolygonAttrLight[i]=enabled THEN
DiffuseLevel = max(0,-(LightVector[i]*NormalVector))
ShininessLevel = max(0,(-HalfVector[i])*(NormalVector))^2
IF TableEnabled THEN ShininessLevel = ShininessTable[ShininessLevel]
;note: below processed separately for the R,G,B color components...
VertexColor = VertexColor + SpecularColor*LightColor[i]*ShininessLevel
VertexColor = VertexColor + DiffuseColor*LightColor[i]*DiffuseLevel
VertexColor = VertexColor + AmbientColor*LightColor[i]
ENDIF
NEXT i
http://desmume.svn.sourceforge.net/view ... iew=markup (line 1179) gives me better results
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest