View main.cpp
#include <stdio.h>
#include <stdint.h>
#include <new>
struct Empty { }; // implicitly-defined default ctor
struct Foo : Empty
{
uint8_t a;
uint8_t b;
View Tex2DCatmullRom.hlsl
// Samples a texture with Catmull-Rom filtering, using 9 texture fetches instead of 16.
// See http://vec3.ca/bicubic-filtering-in-fewer-taps/ for more details
float4 SampleTextureCatmullRom(in Texture2D<float4> tex, in SamplerState linearSampler, in float2 uv, in float2 texSize)
{
// We're going to sample a a 4x4 grid of texels surrounding the target UV coordinate. We'll do this by rounding
// down the sample location to get the exact center of our "starting" texel. The starting texel will be at
// location [1, 1] in the grid, where [0, 0] is the top left corner.
float2 samplePos = uv * texSize;
float2 texPos1 = floor(samplePos - 0.5f) + 0.5f;
View helpers.sh.diff
164c164
< vec3 FetchDiffuseFilteredTexture(sampler2D texLightFiltered, vec3 _p1, vec3 _p2, vec3 _p3, vec3 _p4)
---
> vec3 FetchDiffuseFilteredTexture(sampler2D texLightFiltered, vec3 p1_, vec3 p2_, vec3 p3_, vec3 p4_)
167,168c167,168
< vec3 V1 = _p2 - _p1;
< vec3 V2 = _p4 - _p1;
---
> vec3 V1 = p2_ - p1_;
> vec3 V2 = p4_ - p1_;