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 <core/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 void SetPixel (uint8_t *p, const COLOR_RGBA &v)
 
static SFVEC3F convertLinearToSRGB (const SFVEC3F &aRGBcolor)
 
static SFVEC4F convertLinearToSRGBA (const SFVEC4F &aRGBAcolor)
 
SFVEC3F ConvertSRGBToLinear (const SFVEC3F &aSRGBcolor)
 
SFVEC4F ConvertSRGBAToLinear (const SFVEC4F &aSRGBAcolor)
 
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

Definition at line 464 of file render_3d_raytrace_base.cpp.

◆ 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 244 of file render_3d_raytrace_base.cpp.

◆ USE_EXPERIMENTAL_SOFT_SHADOWS

#define USE_EXPERIMENTAL_SOFT_SHADOWS   1

Definition at line 1383 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

Definition at line 259 of file render_3d_raytrace_base.cpp.

References convertLinearToSRGB().

◆ ConvertSRGBAToLinear()

SFVEC4F ConvertSRGBAToLinear ( const SFVEC4F aSRGBAcolor)

Definition at line 278 of file render_3d_raytrace_base.cpp.

References ConvertSRGBToLinear().

Referenced by RENDER_3D_RAYTRACE_BASE::render().

◆ ConvertSRGBToLinear()

◆ distance()

◆ HITINFO_PACKET_init()

◆ SetPixel()

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

Definition at line 110 of file render_3d_raytrace_base.cpp.

References COLOR_RGBA::c.

Referenced by RENDER_3D_RAYTRACE_BASE::renderPreview().