KiCad PCB EDA Suite
Loading...
Searching...
No Matches
render_3d_raytrace_base.cpp File Reference
#include <algorithm>
#include <atomic>
#include <chrono>
#include <thread>
#include "render_3d_raytrace_base.h"
#include "mortoncodes.h"
#include "../color_rgba.h"
#include "3d_fastmath.h"
#include "3d_math.h"
#include <thread_pool.h>
#include <core/profile.h>
#include <wx/log.h>

Go to the source code of this file.

Macros

#define SRGB_GAMA   2.4f
 
#define DISP_FACTOR   0.075f
 
#define USE_EXPERIMENTAL_SOFT_SHADOWS   1
 

Functions

static SFVEC3F convertLinearToSRGB (const SFVEC3F &aRGBcolor)
 
static SFVEC4F convertLinearToSRGBA (const SFVEC4F &aRGBAcolor)
 
SFVEC3F ConvertSRGBToLinear (const SFVEC3F &aSRGBcolor)
 
SFVEC4F ConvertSRGBAToLinear (const SFVEC4F &aSRGBAcolor)
 
static void SetPixel (uint8_t *p, const COLOR_RGBA &v)
 
static void SetPixelSRGBA (uint8_t *p, const COLOR_RGBA &v)
 
static void HITINFO_PACKET_init (HITINFO_PACKET *aHitPacket)
 
static float distance (const SFVEC2UI &a, const SFVEC2UI &b)
 

Macro Definition Documentation

◆ DISP_FACTOR

#define DISP_FACTOR   0.075f

◆ SRGB_GAMA

#define SRGB_GAMA   2.4f
Todo
This should be removed in future when KiCad supports a greater version of glm lib.

Definition at line 43 of file render_3d_raytrace_base.cpp.

Referenced by convertLinearToSRGB(), and ConvertSRGBToLinear().

◆ USE_EXPERIMENTAL_SOFT_SHADOWS

#define USE_EXPERIMENTAL_SOFT_SHADOWS   1

Definition at line 1413 of file render_3d_raytrace_base.cpp.

Function Documentation

◆ convertLinearToSRGB()

static SFVEC3F convertLinearToSRGB ( const SFVEC3F & aRGBcolor)
static

◆ convertLinearToSRGBA()

static SFVEC4F convertLinearToSRGBA ( const SFVEC4F & aRGBAcolor)
static

◆ ConvertSRGBAToLinear()

SFVEC4F ConvertSRGBAToLinear ( const SFVEC4F & aSRGBAcolor)

◆ ConvertSRGBToLinear()

◆ distance()

◆ HITINFO_PACKET_init()

◆ SetPixel()

static void SetPixel ( uint8_t * p,
const COLOR_RGBA & v )
inlinestatic

Definition at line 157 of file render_3d_raytrace_base.cpp.

References COLOR_RGBA::c.

Referenced by SetPixelSRGBA().

◆ SetPixelSRGBA()

static void SetPixelSRGBA ( uint8_t * p,
const COLOR_RGBA & v )
static