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/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 (GLubyte *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 476 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 256 of file render_3d_raytrace_base.cpp.

◆ USE_EXPERIMENTAL_SOFT_SHADOWS

#define USE_EXPERIMENTAL_SOFT_SHADOWS   1

Definition at line 1395 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 271 of file render_3d_raytrace_base.cpp.

References convertLinearToSRGB().

◆ ConvertSRGBAToLinear()

SFVEC4F ConvertSRGBAToLinear ( const SFVEC4F aSRGBAcolor)

Definition at line 290 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 ( GLubyte *  p,
const COLOR_RGBA v 
)
inlinestatic

Definition at line 109 of file render_3d_raytrace_base.cpp.

References COLOR_RGBA::c.

Referenced by RENDER_3D_RAYTRACE_BASE::renderPreview().