Split perspective state out, to let shaders better interact with it

This commit is contained in:
Mike Primm 2011-07-07 08:41:31 -05:00
parent 4f73d2cbd6
commit 56e5f6fbb3
4 changed files with 147 additions and 65 deletions

View file

@ -11,21 +11,16 @@ public interface HDShaderState {
/**
* Reset renderer state for new ray - passes in pixel coordinate for ray
*/
void reset(int x, int y, Vector3D raystart, double scale);
void reset(HDPerspectiveState ps);
/**
* Process next ray step - called for each block on route
* @param blocktype - block type of current block
* @param blockdata - data nibble of current block
* @param skylightlevel - sky light level of previous block (surface on current block)
* @param emittedlightlevel - emitted light level of previous block (surface on current block)
* @param laststep - direction of last step
* @return true if ray is done, false if ray needs to continue
*/
boolean processBlock(int blocktype, int blockdata, int skylightlevel, int emittedlightlevel, HDMap.BlockStep laststep);
boolean processBlock(HDPerspectiveState ps);
/**
* Ray ended - used to report that ray has exited map (called if renderer has not reported complete)
*/
void rayFinished();
void rayFinished(HDPerspectiveState ps);
/**
* Get result color - get resulting color for ray
* @param c - object to store color value in