KiCad PCB EDA Suite
Loading...
Searching...
No Matches
render_3d_raytrace.cpp File Reference
#include <gal/opengl/kiglew.h>
#include <algorithm>
#include <atomic>
#include <chrono>
#include <thread>
#include "render_3d_raytrace.h"
#include "mortoncodes.h"
#include "../color_rgb.h"
#include "3d_fastmath.h"
#include "3d_math.h"
#include "../common_ogl/ogl_utils.h"
#include <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_RGB &v)
 
static SFVEC3F convertLinearToSRGB (const SFVEC3F &aRGBcolor)
 
SFVEC3F ConvertSRGBToLinear (const SFVEC3F &aSRGBcolor)
 
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 622 of file render_3d_raytrace.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 412 of file render_3d_raytrace.cpp.

◆ USE_EXPERIMENTAL_SOFT_SHADOWS

#define USE_EXPERIMENTAL_SOFT_SHADOWS   1

Definition at line 1539 of file render_3d_raytrace.cpp.

Function Documentation

◆ convertLinearToSRGB()

static SFVEC3F convertLinearToSRGB ( const SFVEC3F aRGBcolor)
static

Definition at line 417 of file render_3d_raytrace.cpp.

References SRGB_GAMA.

Referenced by RENDER_3D_RAYTRACE::renderFinalColor().

◆ ConvertSRGBToLinear()

◆ distance()

◆ HITINFO_PACKET_init()

◆ SetPixel()

static void SetPixel ( GLubyte *  p,
const COLOR_RGB v 
)
inlinestatic

Definition at line 139 of file render_3d_raytrace.cpp.

References COLOR_RGB::c.

Referenced by RENDER_3D_RAYTRACE::renderPreview().