Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Some Graphics Issues
06-04-2013, 07:51 AM
Post: #10
RE: Some Graphics Issues
(06-04-2013 12:06 AM)[Unknown] Wrote:  hasNormals means whether or not the vertex coordinates contained a normal (a lighting coordinate.)

For example, the coordinates can also contain colors (hasColor) and positions, as well as some other things like I think weights and stuff.

Before, we assumed that if the coordinates didn't specify lighting at all, this meant lighting should not be applied. However, we found a game that did expect lighting to be applied even when it did not provide a normal (it seemed to use a default one pretty clearly.)

I took a quick look at JPCSP for this question now:
https://code.google.com/p/jpcsp/source/b...hader.vert

It seems to apply lighting even when there is no normal specified, although I may be reading it wrong. That said, it seems to use the default coordinate vec3(1.0, 0.0, 0.0) (I assume that's x, y, z?) They seem to normalize it, which I'll be honest - I'm not sure what that means for a coordinate (I'm not great with 3D, I don't know the terminology and suck at trig.) But, it does not seem like applying lighting without normals is wrong.

We just have to figure out what is right.

-[Unknown]

As long as the PSP has an internal vertex attribute state (which, having different formats input formats, it's likely, as it has to decompress/un-quantize them somewhere before using it), it's safe to assume it has some default normal. I don't really have the time to check it out, neither to skim documentation, just throwing ideas here Tongue

If PSPs GPU has internal state, then ,even when not providing that attribute in the vertex arrays, you would get lighting when enabling one of the lights.

About the vec3(1,0,0), in case you're interested, it's (x,y,z), and it's normalized because it has some nice properties, for example, the dot product of two normalized vectors is the cosine between those vectors, thus lighting is trivial to compute.

Good luck fixing that, emulating proprietary fixed GPUs is a PITA :/
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Some Graphics Issues - GuilhermeGS2 - 06-03-2013, 02:54 AM
RE: Some Graphics Issues - [Unknown] - 06-03-2013, 05:49 AM
RE: Some Graphics Issues - GuilhermeGS2 - 06-03-2013, 10:17 AM
RE: Some Graphics Issues - Squall Leonhart - 06-03-2013, 02:16 PM
RE: Some Graphics Issues - solarmystic - 06-03-2013, 02:28 PM
RE: Some Graphics Issues - GuilhermeGS2 - 06-03-2013, 02:31 PM
RE: Some Graphics Issues - [Unknown] - 06-04-2013, 12:06 AM
RE: Some Graphics Issues - grumpy_coder - 06-04-2013 07:51 AM
RE: Some Graphics Issues - GuilhermeGS2 - 06-04-2013, 01:41 AM
RE: Some Graphics Issues - [Unknown] - 06-04-2013, 05:43 AM
RE: Some Graphics Issues - GuilhermeGS2 - 06-05-2013, 01:23 PM
RE: Some Graphics Issues - Lavish - 03-17-2017, 08:14 AM

Forum Jump: