playdeadgames / temporal

Temporal Reprojection Anti-Aliasing for Unity 5.0+
MIT License
1.84k stars 192 forks source link

Wrong defines in VelocityBuffer.shader #13

Open danielmaciel opened 7 years ago

danielmaciel commented 7 years ago

Hi,

EDIT: On file VelocityBuffer.shader

While trying to understand the algorithm, I noticed on line 10 the multi_compile statement and the following defines: TILESIZE_10, TILESIZE_20, TILESIZE_40.

But when they are used they are spelled differently (line 72 and onwards): TILE_SIZE_10, TILE_SIZE_20, TILE_SIZE_40. Note the underscores between 'TILE' and 'SIZE'.

Does that mean you always use a tile size of 1 on those shaders? Is that what shipped with the game?

BEGIN EDIT

I ask this because on file VelocityBuffer.cs, line 37, neighborMaxSupport is initialized like this:

public NeighborMaxSupport neighborMaxSupport = NeighborMaxSupport.TileSize20;

So apparently it was supposed to be TILESIZE_20 by default?

END EDIT

EDIT Apparently this pass is not even being used because of 'neighborMaxGen' being 'false', so maybe this issue is not important

Best regards, Daniel

Invertex commented 7 years ago

It is reimplemented in my branch, but it doesn't seem to do much.