formatting
This commit is contained in:
parent
d427bcbb2a
commit
a7b6b501a2
@ -34,8 +34,8 @@ float rand_angle(uint2 pos, uint ray_index) {
|
|||||||
|
|
||||||
int3 noise_coord = int3(1, 1, 1);
|
int3 noise_coord = int3(1, 1, 1);
|
||||||
noise_coord += int3(pos.xy, ray_index);
|
noise_coord += int3(pos.xy, ray_index);
|
||||||
// noise_coord.xyz += g_constants.frame_seed.xyz;
|
noise_coord.xyz += g_constants.frame_seed.xyz;
|
||||||
noise_coord.xy -= g_constants.camera_offset;
|
// noise_coord.xy -= g_constants.camera_offset;
|
||||||
|
|
||||||
uint noise = noise_tex[noise_coord % uint3(SH_BLUE_NOISE_TEX_WIDTH, SH_BLUE_NOISE_TEX_HEIGHT, SH_BLUE_NOISE_TEX_DEPTH)];
|
uint noise = noise_tex[noise_coord % uint3(SH_BLUE_NOISE_TEX_WIDTH, SH_BLUE_NOISE_TEX_HEIGHT, SH_BLUE_NOISE_TEX_DEPTH)];
|
||||||
return ((float)noise / (float)0xFFFF) * TAU;
|
return ((float)noise / (float)0xFFFF) * TAU;
|
||||||
|
|||||||
11
src/config.h
11
src/config.h
@ -24,14 +24,13 @@
|
|||||||
#define RESOURCE_RELOADING (DEVELOPER && !RESOURCES_EMBEDDED)
|
#define RESOURCE_RELOADING (DEVELOPER && !RESOURCES_EMBEDDED)
|
||||||
|
|
||||||
#define DEFAULT_CAMERA_WIDTH (16)
|
#define DEFAULT_CAMERA_WIDTH (16)
|
||||||
#define DEFAULT_CAMERA_HEIGHT (DEFAULT_CAMERA_WIDTH / (16.0 / 9.0))
|
#define DEFAULT_CAMERA_HEIGHT ((f64)DEFAULT_CAMERA_WIDTH / (16.0 / 9.0))
|
||||||
|
|
||||||
/* Rendered image size will be (camera_width * pixels_per_unit) x (camera_height * pixels_per_unit) */
|
|
||||||
#define PIXELS_PER_UNIT 40.0
|
|
||||||
|
|
||||||
/* Rendered texture size + extra room for off-screen light falloff */
|
/* Rendered texture size + extra room for off-screen light falloff */
|
||||||
#define RENDER_WIDTH (640 + 200)
|
#define RENDER_WIDTH (640 + 250)
|
||||||
#define RENDER_HEIGHT (360 + 200)
|
#define RENDER_HEIGHT (360 + 250)
|
||||||
|
|
||||||
|
#define PIXELS_PER_UNIT ((f64)640 / (f64)DEFAULT_CAMERA_WIDTH)
|
||||||
|
|
||||||
/* How many ticks back in time should the user thread blend between?
|
/* How many ticks back in time should the user thread blend between?
|
||||||
* <Delay> = <USER_INTERP_RATIO> * <Tick interval>
|
* <Delay> = <USER_INTERP_RATIO> * <Tick interval>
|
||||||
|
|||||||
@ -987,7 +987,7 @@ INTERNAL void user_update(struct sys_window *window)
|
|||||||
* ========================== */
|
* ========================== */
|
||||||
|
|
||||||
b32 effects_disabled = 0;
|
b32 effects_disabled = 0;
|
||||||
G.render_size = V2(RENDER_WIDTH, RENDER_HEIGHT);
|
G.render_size = v2_round(V2(RENDER_WIDTH, RENDER_HEIGHT));
|
||||||
|
|
||||||
if (G.debug_camera) {
|
if (G.debug_camera) {
|
||||||
G.render_size = G.ui_size;
|
G.render_size = G.ui_size;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user