This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// While implementing a tile based light culling shader, I stumbled uppon the bachelor thesis from Jonathan W. Hale: | |
/// "Dual-Cone View Culling for Virtual Reality Applications" (2018). While lookin at his final version, I | |
/// realized that his code could be even further simplified, if the cone's tip is the origin of the coordinate system. | |
/// By creating a "world to cone view space" transformation matrix, that aligns the code to the positive +Z axis and | |
/// also set's the cone's tip as the origin, this matrix can then be used to transform the world coordinates into the | |
/// "cone view space". The following code uses a left handed coordinate system. | |
/// The test itself only uses 10 instructions: | |
/// | |
/// - 2 scalar multiplications | |
/// - 2 additions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** A fragment shader to convert NV12 to RGB. | |
* Input textures Y - is a block of size w*h. | |
* texture UV is of size w*h/2. | |
* Remember, both U and V are individually of size w/2*h/2, but they are interleaved. | |
* The layout looks like this : | |
* ---------- | |
* | | | |
* | Y | size = w*h | |
* | | | |
* |________| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.common.cache.CacheBuilder; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.cache.CacheManager; | |
import org.springframework.cache.annotation.CachingConfigurer; | |
import org.springframework.cache.annotation.EnableCaching; | |
import org.springframework.cache.guava.GuavaCache; | |
import org.springframework.cache.interceptor.CacheErrorHandler; | |
import org.springframework.cache.interceptor.CacheResolver; | |
import org.springframework.cache.interceptor.KeyGenerator; |