Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

OptiXShaders.cu File Reference

Core OptiX/CUDA ray tracing engine implementation. More...

#include <optix.h>
#include <optixu/optixu_math_namespace.h>
#include <optixu/optixu_matrix_namespace.h>
#include <optixu/optixu_aabb_namespace.h>
#include "OptiXShaders.h"

Go to the source code of this file.

Namespaces

namespace  optix

Compounds

struct  PerRayData_radiance
struct  PerRayData_shadow

Defines

#define ORT_TIME_NORMALIZATION   (1e-9 / 2.5f)
#define ORT_TIME_COMBINE_MAX   1
#define ORT_USE_RAY_STEP   1
#define ORT_TRANS_USE_INCIDENT   1
#define ORT_RAY_STEP   N*scene_epsilon*4.0f
#define ORT_RAY_STEP2   ray.direction*scene_epsilon*4.0f
#define REVERSE_RAY_STEP   (scene_epsilon*10.0f)
#define REVERSE_RAY_LENGTH   3.0f
#define ORT_USE_SPHERES_HEARNBAKER   1
#define MYRT_RAND_MAX   4294967296.0f
#define MYRT_RAND_MAX_INV   .00000000023283064365f
#define CLIP_VIEW_on   1
#define CLIP_VIEW_off   0
#define HEADLIGHT_on   1
#define HEADLIGHT_off   0
#define FOG_on   1
#define FOG_off   0
#define SHADOWS_on   1
#define SHADOWS_off   0
#define AO_on   1
#define AO_off   0
#define OUTLINE_on   1
#define OUTLINE_off   0
#define REFL_on   1
#define REFL_off   0
#define TRANS_on   1
#define TRANS_off   0
#define DEFINE_CLOSEST_HIT(mclipview, mhlight, mfog, mshad, mao, moutl, mrefl, mtrans)

Functions

template<unsigned int N> __host__ __device__ __inline__
unsigned int 
tea (unsigned int val0, unsigned int val1)
 rtDeclareVariable (float, accumulation_normalization_factor,,)
 max AO occluder distance... More...

 rtDeclareVariable (uint2, launch_index, rtLaunchIndex,)
 rtDeclareVariable (unsigned int, accumCount,,)
 rtDeclareVariable (int, progressive_enabled,,)
 rtDeclareVariable (float, scene_epsilon,,)
 rtDeclareVariable (unsigned int, max_depth,,)
 rtDeclareVariable (int, shadows_enabled,,)
 rtDeclareVariable (int, aa_samples,,)
 rtDeclareVariable (int, clipview_mode,,)
 rtDeclareVariable (float, clipview_start,,)
 rtDeclareVariable (int, headlight_mode,,)
 rtDeclareVariable (int, fog_mode,,)
 rtDeclareVariable (float, fog_start,,)
 rtDeclareVariable (unsigned int, radiance_ray_type,,)
 rtDeclareVariable (unsigned int, shadow_ray_type,,)
 rtDeclareVariable (rtObject, root_object,,)
 rtDeclareVariable (optix::Ray, ray, rtCurrentRay,)
 rtDeclareVariable (float, t_hit, rtIntersectionDistance,)
 rtDeclareVariable (float3, geometric_normal, attribute geometric_normal,)
 rtDeclareVariable (float3, shading_normal, attribute shading_normal,)
 rtDeclareVariable (float3, obj_color, attribute obj_color,)
 rtDeclareVariable (PerRayData_radiance, prd_radiance, rtPayload,)
 rtDeclareVariable (DirectionalLightList, dir_light_list,,)
 rtDeclareVariable (PositionalLightList, pos_light_list,,)
__device__ __inline__ uchar4 make_color_rgb4u (const float3 &c)
__device__ __inline__ uchar4 make_color_rgb4u (const float4 &c)
RT_PROGRAM void miss_solid_bg ()
RT_PROGRAM void miss_gradient_bg_sky_sphere ()
RT_PROGRAM void miss_gradient_bg_sky_plane ()
__device__ __inline__ unsigned
int 
myrt_rand (unsigned int &idum)
__device__ __inline__ void jitter_offset2f (unsigned int &pval, float2 &xy)
__device__ __inline__ void jitter_disc2f (unsigned int &pval, float2 &xy, float radius)
__device__ __inline__ void jitter_sphere3f (unsigned int &pval, float3 &dir)
__device__ void sphere_fade_and_clip (const float3 &hit_point, const float3 &cam_pos, float fade_start, float fade_end, float &alpha)
__device__ void ray_sphere_clip_interval (const optix::Ray &ray, float3 center, float rad, float2 &tinterval)
__device__ void clip_ray_by_plane (optix::Ray &ray, const float4 plane)
RT_PROGRAM void clear_accumulation_buffer ()
RT_PROGRAM void draw_accumulation_buffer ()
RT_PROGRAM void draw_accumulation_buffer_stub ()
void __inline__ __device__ accumulate_color (float3 &col, float alpha=1.0f)
int __inline__ __device__ subframe_count ()
__device__ __inline__ void dof_ray (const float3 &ray_origin_orig, float3 &ray_origin, const float3 &ray_direction_orig, float3 &ray_direction, unsigned int &randseed, const float3 &up, const float3 &right)
template<int STEREO_ON, int DOF_ON> __device__ __inline__ void vmd_camera_cubemap_general ()
RT_PROGRAM void vmd_camera_cubemap ()
RT_PROGRAM void vmd_camera_cubemap_dof ()
RT_PROGRAM void vmd_camera_cubemap_stereo ()
RT_PROGRAM void vmd_camera_cubemap_stereo_dof ()
template<int STEREO_ON, int DOF_ON> __device__ __inline__ void vmd_camera_dome_general ()
RT_PROGRAM void vmd_camera_dome_master ()
RT_PROGRAM void vmd_camera_dome_master_dof ()
RT_PROGRAM void vmd_camera_dome_master_stereo ()
RT_PROGRAM void vmd_camera_dome_master_stereo_dof ()
template<int STEREO_ON, int DOF_ON> __device__ __inline__ void vmd_camera_equirectangular_general ()
RT_PROGRAM void vmd_camera_equirectangular ()
RT_PROGRAM void vmd_camera_equirectangular_dof ()
RT_PROGRAM void vmd_camera_equirectangular_stereo ()
RT_PROGRAM void vmd_camera_equirectangular_stereo_dof ()
template<int STEREO_ON, int DOF_ON> __device__ __inline__ void vmd_camera_oculus_rift_general ()
RT_PROGRAM void vmd_camera_oculus_rift ()
RT_PROGRAM void vmd_camera_oculus_rift_dof ()
RT_PROGRAM void vmd_camera_oculus_rift_stereo ()
RT_PROGRAM void vmd_camera_oculus_rift_stereo_dof ()
template<int STEREO_ON, int DOF_ON> __device__ __inline__ void vmd_camera_perspective_general ()
RT_PROGRAM void vmd_camera_perspective ()
RT_PROGRAM void vmd_camera_perspective_dof ()
RT_PROGRAM void vmd_camera_perspective_stereo ()
RT_PROGRAM void vmd_camera_perspective_stereo_dof ()
template<int STEREO_ON, int DOF_ON> __device__ __inline__ void vmd_camera_orthographic_general ()
RT_PROGRAM void vmd_camera_orthographic ()
RT_PROGRAM void vmd_camera_orthographic_dof ()
RT_PROGRAM void vmd_camera_orthographic_stereo ()
RT_PROGRAM void vmd_camera_orthographic_stereo_dof ()
RT_PROGRAM void exception ()
__device__ float fog_coord (float3 hit_point)
__device__ float3 fog_color (float fogmod, float3 hit_col)
__device__ float3 shade_ambient_occlusion (float3 hit, float3 N, float aoimportance)
template<int SHADOWS_ON> __device__ __inline__ void shade_light (float3 &result, float3 &hit_point, float3 &N, float3 &L, float p_Kd, float p_Ks, float p_phong_exp, float3 &col, float3 &phongcol, float shadow_tmax)
 scene-wide shading property. More...

template<int CLIP_VIEW_ON, int HEADLIGHT_ON, int FOG_ON, int SHADOWS_ON, int AO_ON, int OUTLINE_ON, int REFLECTION_ON, int TRANSMISSION_ON> __device__ void shader_template (float3 p_obj_color, float3 N, float p_Ka, float p_Kd, float p_Ks, float p_phong_exp, float p_reflectivity, float p_opacity, float p_outline, float p_outlinewidth, int p_transmode)
 material-specific shading property. More...

 rtDeclareVariable (float3, uniform_color,,)
 rtDeclareVariable (float, Ka,,)
 rtDeclareVariable (float, phong_exp,,)
 rtDeclareVariable (float, opacity,,)
 rtDeclareVariable (int, transmode,,)
RT_PROGRAM void any_hit_opaque ()
RT_PROGRAM void any_hit_transmission ()
RT_PROGRAM void any_hit_clip_sphere ()
__inline__ __device__ float3 calc_ffworld_normal (const float3 &Nshading, const float3 &Ngeometric)
template<int HWTRIANGLES> __device__ __inline__ float3 get_intersection_normal ()
template<int HWTRIANGLES> __device__ __inline__ float3 get_intersection_color ()
RT_PROGRAM void closest_hit_radiance_general ()
RT_PROGRAM void cylinder_array_intersect (int primIdx)
RT_PROGRAM void cylinder_array_bounds (int primIdx, float result[6])
RT_PROGRAM void cylinder_array_color_intersect (int primIdx)
RT_PROGRAM void cylinder_array_color_bounds (int primIdx, float result[6])
RT_PROGRAM void ring_array_color_intersect (int primIdx)
RT_PROGRAM void ring_array_color_bounds (int primIdx, float result[6])
__host__ __device__ __inline__
void 
sphere_intersect_hearn_baker2 (float3 center, float radius, const float3 &spcolor)
RT_PROGRAM void sphere_array_intersect (int primIdx)
RT_PROGRAM void sphere_array_bounds (int primIdx, float result[6])
RT_PROGRAM void sphere_array_color_intersect (int primIdx)
RT_PROGRAM void sphere_array_color_bounds (int primIdx, float result[6])
__device__ __inline__ void generic_tri_bounds (optix::Aabb *aabb, float3 v0, float3 v1, float3 v2)
RT_PROGRAM void tricolor_intersect (int primIdx)
RT_PROGRAM void tricolor_bounds (int primIdx, float result[6])
RT_PROGRAM void trimesh_c4u_n3b_v3f_intersect (int primIdx)
RT_PROGRAM void trimesh_c4u_n3b_v3f_bounds (int primIdx, float result[6])
RT_PROGRAM void trimesh_n3f_v3f_intersect (int primIdx)
RT_PROGRAM void trimesh_n3f_v3f_bounds (int primIdx, float result[6])
RT_PROGRAM void trimesh_n3b_v3f_intersect (int primIdx)
RT_PROGRAM void trimesh_n3b_v3f_bounds (int primIdx, float result[6])
RT_PROGRAM void trimesh_v3f_intersect (int primIdx)
RT_PROGRAM void trimesh_v3f_bounds (int primIdx, float result[6])

Variables

rtBuffer< uchar4, 2 > framebuffer
rtBuffer< float4, 2 > accumulation_buffer
rtBuffer< vmd_cylindercylinder_buffer
rtBuffer< vmd_cylinder_colorcylinder_color_buffer
rtBuffer< vmd_ring_colorring_color_buffer
rtBuffer< vmd_spheresphere_buffer
rtBuffer< vmd_sphere_colorsphere_color_buffer
rtBuffer< vmd_tricolortricolor_buffer
rtBuffer< vmd_trimesh_c4u_n3b_v3ftrimesh_c4u_n3b_v3f_buffer
rtBuffer< vmd_trimesh_n3f_v3ftrimesh_n3f_v3f_buffer
rtBuffer< vmd_trimesh_n3b_v3ftrimesh_n3b_v3f_buffer
rtBuffer< vmd_trimesh_v3ftrimesh_v3f_buffer


Detailed Description

Core OptiX/CUDA ray tracing engine implementation.

Major parts of this code are directly taken from the Tachyon parallel ray tracer, and were contributed to VMD by the Tachyon author and lead VMD developer John E. Stone.

This work is described in: "GPU-Accelerated Molecular Visualization on Petascale Supercomputing Platforms" John E. Stone, Kirby L. Vandivort, and Klaus Schulten. UltraVis'13: Proceedings of the 8th International Workshop on Ultrascale Visualization, pp. 6:1-6:8, 2013. http://dx.doi.org/10.1145/2535571.2535595

"Atomic Detail Visualization of Photosynthetic Membranes with GPU-Accelerated Ray Tracing" John E. Stone, Melih Sener, Kirby L. Vandivort, Angela Barragan, Abhishek Singharoy, Ivan Teo, João V. Ribeiro, Barry Isralewitz, Bo Liu, Boon Chong Goh, James C. Phillips, Craig MacGregor-Chatwin, Matthew P. Johnson, Lena F. Kourkoutis, C. Neil Hunter, and Klaus Schulten J. Parallel Computing, 55:17-27, 2016. http://dx.doi.org/10.1016/j.parco.2015.10.015

"Immersive Molecular Visualization with Omnidirectional Stereoscopic Ray Tracing and Remote Rendering" John E. Stone, William R. Sherman, and Klaus Schulten. High Performance Data Analysis and Visualization Workshop, 2016 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW), pp. 1048-1057, 2016. http://dx.doi.org/10.1109/IPDPSW.2016.121

"Omnidirectional Stereoscopic Projections for VR" John E. Stone. In, William R. Sherman, editor, VR Developer Gems, Taylor and Francis / CRC Press, Chapter 24, 2019.

"Interactive Ray Tracing Techniques for High-Fidelity Scientific Visualization" John E. Stone. In, Eric Haines and Tomas Akenine-Möller, editors, Ray Tracing Gems, Apress, Chapter 27, pp. 493-515, 2019. https://link.springer.com/book/10.1007/978-1-4842-4427-2

"A Planetarium Dome Master Camera" John E. Stone. In, Eric Haines and Tomas Akenine-Möller, editors, Ray Tracing Gems, Apress, Chapter 4, pp. 49-60, 2019. https://link.springer.com/book/10.1007/978-1-4842-4427-2

Portions of this code are derived from Tachyon: "An Efficient Library for Parallel Ray Tracing and Animation" John E. Stone. Master's Thesis, University of Missouri-Rolla, Department of Computer Science, April 1998

"Rendering of Numerical Flow Simulations Using MPI" John Stone and Mark Underwood. Second MPI Developers Conference, pages 138-141, 1996. http://dx.doi.org/10.1109/MPIDC.1996.534105

Definition in file OptiXShaders.cu.


Define Documentation

#define AO_off   0
 

Definition at line 2702 of file OptiXShaders.cu.

#define AO_on   1
 

Definition at line 2701 of file OptiXShaders.cu.

#define CLIP_VIEW_off   0
 

Definition at line 2694 of file OptiXShaders.cu.

#define CLIP_VIEW_on   1
 

Definition at line 2693 of file OptiXShaders.cu.

#define DEFINE_CLOSEST_HIT mclipview,
mhlight,
mfog,
mshad,
mao,
moutl,
mrefl,
mtrans   
 

Value:

RT_PROGRAM void                                                        \
  closest_hit_radiance_CLIP_VIEW_##mclipview##_HEADLIGHT_##mhlight##_FOG_##mfog##_SHADOWS_##mshad##_AO_##mao##_OUTLINE_##moutl##_REFL_##mrefl##_TRANS_##mtrans() { \
                                                                         \
    shader_template<CLIP_VIEW_##mclipview,                               \
                    HEADLIGHT_##mhlight,                                 \
                    FOG_##mfog,                                          \
                    SHADOWS_##mshad,                                     \
                    AO_##mao,                                            \
                    OUTLINE_##moutl,                                     \
                    REFL_##mrefl,                                        \
                    TRANS_##mtrans >                                     \
                    (get_intersection_color<0>(),                        \
                     get_intersection_normal<0>(),                       \
                     Ka, Kd, Ks, phong_exp, Krefl,                       \
                     opacity, outline, outlinewidth, transmode);         \
  }

Definition at line 2710 of file OptiXShaders.cu.

#define FOG_off   0
 

Definition at line 2698 of file OptiXShaders.cu.

#define FOG_on   1
 

Definition at line 2697 of file OptiXShaders.cu.

#define HEADLIGHT_off   0
 

Definition at line 2696 of file OptiXShaders.cu.

#define HEADLIGHT_on   1
 

Definition at line 2695 of file OptiXShaders.cu.

#define MYRT_RAND_MAX   4294967296.0f
 

Definition at line 375 of file OptiXShaders.cu.

#define MYRT_RAND_MAX_INV   .00000000023283064365f
 

Definition at line 376 of file OptiXShaders.cu.

Referenced by jitter_disc2f, jitter_offset2f, and jitter_sphere3f.

#define ORT_RAY_STEP   N*scene_epsilon*4.0f
 

Definition at line 110 of file OptiXShaders.cu.

Referenced by shade_ambient_occlusion, shade_light, and shader_template.

#define ORT_RAY_STEP2   ray.direction*scene_epsilon*4.0f
 

Definition at line 111 of file OptiXShaders.cu.

Referenced by shader_template.

#define ORT_TIME_COMBINE_MAX   1
 

Definition at line 97 of file OptiXShaders.cu.

#define ORT_TIME_NORMALIZATION   (1e-9 / 2.5f)
 

Definition at line 93 of file OptiXShaders.cu.

#define ORT_TRANS_USE_INCIDENT   1
 

Definition at line 109 of file OptiXShaders.cu.

#define ORT_USE_RAY_STEP   1
 

Definition at line 108 of file OptiXShaders.cu.

#define ORT_USE_SPHERES_HEARNBAKER   1
 

Definition at line 132 of file OptiXShaders.cu.

#define OUTLINE_off   0
 

Definition at line 2704 of file OptiXShaders.cu.

#define OUTLINE_on   1
 

Definition at line 2703 of file OptiXShaders.cu.

#define REFL_off   0
 

Definition at line 2706 of file OptiXShaders.cu.

#define REFL_on   1
 

Definition at line 2705 of file OptiXShaders.cu.

#define REVERSE_RAY_LENGTH   3.0f
 

Definition at line 127 of file OptiXShaders.cu.

Referenced by shade_ambient_occlusion, and shade_light.

#define REVERSE_RAY_STEP   (scene_epsilon*10.0f)
 

Definition at line 126 of file OptiXShaders.cu.

Referenced by shade_ambient_occlusion, and shade_light.

#define SHADOWS_off   0
 

Definition at line 2700 of file OptiXShaders.cu.

#define SHADOWS_on   1
 

Definition at line 2699 of file OptiXShaders.cu.

#define TRANS_off   0
 

Definition at line 2708 of file OptiXShaders.cu.

#define TRANS_on   1
 

Definition at line 2707 of file OptiXShaders.cu.


Function Documentation

void __inline__ __device__ accumulate_color float3 &    col,
float    alpha = 1.0f
[static]
 

Definition at line 608 of file OptiXShaders.cu.

References accumulation_buffer, and make_float4.

Referenced by vmd_camera_cubemap_general, vmd_camera_dome_general, vmd_camera_equirectangular_general, vmd_camera_oculus_rift_general, vmd_camera_orthographic_general, and vmd_camera_perspective_general.

RT_PROGRAM void any_hit_clip_sphere  
 

Definition at line 1999 of file OptiXShaders.cu.

References make_float3, and sphere_fade_and_clip.

RT_PROGRAM void any_hit_opaque  
 

Definition at line 1969 of file OptiXShaders.cu.

References make_float3.

RT_PROGRAM void any_hit_transmission  
 

Definition at line 1980 of file OptiXShaders.cu.

References make_float3.

__inline__ __device__ float3 calc_ffworld_normal const float3 &    Nshading,
const float3 &    Ngeometric
[static]
 

Definition at line 2030 of file OptiXShaders.cu.

Referenced by get_intersection_normal.

RT_PROGRAM void clear_accumulation_buffer  
 

Definition at line 566 of file OptiXShaders.cu.

References accumulation_buffer, and make_float4.

__device__ void clip_ray_by_plane optix::Ray &    ray,
const float4    plane
 

Definition at line 532 of file OptiXShaders.cu.

References dot, make_float3, make_float4, and n.

RT_PROGRAM void closest_hit_radiance_general  
 

Definition at line 2100 of file OptiXShaders.cu.

RT_PROGRAM void cylinder_array_bounds int    primIdx,
float    result[6]
 

Definition at line 2204 of file OptiXShaders.cu.

References cylinder_buffer, make_float3, and result.

RT_PROGRAM void cylinder_array_color_bounds int    primIdx,
float    result[6]
 

Definition at line 2278 of file OptiXShaders.cu.

References cylinder_color_buffer, make_float3, and result.

RT_PROGRAM void cylinder_array_color_intersect int    primIdx
 

Definition at line 2222 of file OptiXShaders.cu.

References cylinder_color_buffer, dot, length, and n.

RT_PROGRAM void cylinder_array_intersect int    primIdx
 

Definition at line 2144 of file OptiXShaders.cu.

References cylinder_buffer, dot, length, and n.

__device__ __inline__ void dof_ray const float3 &    ray_origin_orig,
float3 &    ray_origin,
const float3 &    ray_direction_orig,
float3 &    ray_direction,
unsigned int &    randseed,
const float3 &    up,
const float3 &    right
[static]
 

Definition at line 680 of file OptiXShaders.cu.

References jitter_disc2f.

Referenced by vmd_camera_cubemap_general, vmd_camera_dome_general, vmd_camera_equirectangular_general, vmd_camera_oculus_rift_general, vmd_camera_orthographic_general, and vmd_camera_perspective_general.

RT_PROGRAM void draw_accumulation_buffer  
 

Definition at line 577 of file OptiXShaders.cu.

References accumulation_buffer, framebuffer, and make_color_rgb4u.

RT_PROGRAM void draw_accumulation_buffer_stub  
 

Definition at line 596 of file OptiXShaders.cu.

RT_PROGRAM void exception  
 

Definition at line 1431 of file OptiXShaders.cu.

References framebuffer, make_color_rgb4u, and make_float3.

__device__ float3 fog_color float    fogmod,
float3    hit_col
[static]
 

Definition at line 1507 of file OptiXShaders.cu.

Referenced by shader_template.

__device__ float fog_coord float3    hit_point [static]
 

Definition at line 1463 of file OptiXShaders.cu.

References dot.

Referenced by shader_template.

__device__ __inline__ void generic_tri_bounds optix::Aabb *    aabb,
float3    v0,
float3    v1,
float3    v2
 

Definition at line 2482 of file OptiXShaders.cu.

References length.

Referenced by tricolor_bounds, trimesh_c4u_n3b_v3f_bounds, trimesh_n3b_v3f_bounds, trimesh_n3f_v3f_bounds, and trimesh_v3f_bounds.

template<int HWTRIANGLES>
__device__ __inline__ float3 get_intersection_color   [static]
 

Definition at line 2068 of file OptiXShaders.cu.

template<int HWTRIANGLES>
__device__ __inline__ float3 get_intersection_normal   [static]
 

Definition at line 2038 of file OptiXShaders.cu.

References calc_ffworld_normal, and z.

__device__ __inline__ void jitter_disc2f unsigned int &    pval,
float2 &    xy,
float    radius
[static]
 

Definition at line 410 of file OptiXShaders.cu.

References myrt_rand, and MYRT_RAND_MAX_INV.

Referenced by dof_ray.

__device__ __inline__ void jitter_offset2f unsigned int &    pval,
float2 &    xy
[static]
 

Definition at line 401 of file OptiXShaders.cu.

References myrt_rand, and MYRT_RAND_MAX_INV.

Referenced by vmd_camera_cubemap_general, vmd_camera_dome_general, vmd_camera_equirectangular_general, vmd_camera_oculus_rift_general, vmd_camera_orthographic_general, and vmd_camera_perspective_general.

__device__ __inline__ void jitter_sphere3f unsigned int &    pval,
float3 &    dir
[static]
 

Definition at line 436 of file OptiXShaders.cu.

References dot, myrt_rand, and MYRT_RAND_MAX_INV.

Referenced by shade_ambient_occlusion.

__device__ __inline__ uchar4 make_color_rgb4u const float4 &    c [static]
 

Definition at line 311 of file OptiXShaders.cu.

Referenced by draw_accumulation_buffer, and exception.

__device__ __inline__ uchar4 make_color_rgb4u const float3 &    c [static]
 

Definition at line 301 of file OptiXShaders.cu.

RT_PROGRAM void miss_gradient_bg_sky_plane  
 

Definition at line 358 of file OptiXShaders.cu.

References dot.

RT_PROGRAM void miss_gradient_bg_sky_sphere  
 

Definition at line 340 of file OptiXShaders.cu.

References dot.

RT_PROGRAM void miss_solid_bg  
 

Definition at line 325 of file OptiXShaders.cu.

__device__ __inline__ unsigned int myrt_rand unsigned int &    idum [static]
 

Definition at line 391 of file OptiXShaders.cu.

Referenced by jitter_disc2f, jitter_offset2f, and jitter_sphere3f.

__device__ void ray_sphere_clip_interval const optix::Ray &    ray,
float3    center,
float    rad,
float2 &    tinterval
 

Definition at line 514 of file OptiXShaders.cu.

References dot.

RT_PROGRAM void ring_array_color_bounds int    primIdx,
float    result[6]
 

Definition at line 2323 of file OptiXShaders.cu.

References make_float3, result, and ring_color_buffer.

RT_PROGRAM void ring_array_color_intersect int    primIdx
 

Definition at line 2296 of file OptiXShaders.cu.

References dot, length, and ring_color_buffer.

rtDeclareVariable int   ,
transmode   
 

Referenced by shader_template.

rtDeclareVariable float   ,
opacity   
 

rtDeclareVariable float   ,
phong_exp   
 

rtDeclareVariable float   ,
Ka   
 

rtDeclareVariable float3   ,
uniform_color   
 

rtDeclareVariable PositionalLightList   ,
pos_light_list   
 

rtDeclareVariable DirectionalLightList   ,
dir_light_list   
 

rtDeclareVariable PerRayData_radiance   ,
prd_radiance   ,
rtPayload   
 

rtDeclareVariable float3   ,
obj_color   ,
attribute    obj_color
 

rtDeclareVariable float3   ,
shading_normal   ,
attribute    shading_normal
 

rtDeclareVariable float3   ,
geometric_normal   ,
attribute    geometric_normal
 

rtDeclareVariable float   ,
t_hit   ,
rtIntersectionDistance   
 

rtDeclareVariable optix::Ray   ,
ray   ,
rtCurrentRay   
 

rtDeclareVariable rtObject   ,
root_object   
 

rtDeclareVariable unsigned    int,
shadow_ray_type   
 

rtDeclareVariable unsigned    int,
radiance_ray_type   
 

rtDeclareVariable float   ,
fog_start   
 

rtDeclareVariable int   ,
fog_mode   
 

rtDeclareVariable int   ,
headlight_mode   
 

rtDeclareVariable float   ,
clipview_start   
 

rtDeclareVariable int   ,
clipview_mode   
 

rtDeclareVariable int   ,
aa_samples   
 

rtDeclareVariable int   ,
shadows_enabled   
 

rtDeclareVariable unsigned    int,
max_depth   
 

rtDeclareVariable float   ,
scene_epsilon   
 

rtDeclareVariable int   ,
progressive_enabled   
 

rtDeclareVariable unsigned    int,
accumCount   
 

rtDeclareVariable uint2   ,
launch_index   ,
rtLaunchIndex   
 

rtDeclareVariable float   ,
accumulation_normalization_factor   
 

max AO occluder distance...

__device__ float3 shade_ambient_occlusion float3    hit,
float3    N,
float    aoimportance
[static]
 

Definition at line 1517 of file OptiXShaders.cu.

References PerRayData_shadow::attenuation, dot, jitter_sphere3f, make_float3, ORT_RAY_STEP, REVERSE_RAY_LENGTH, REVERSE_RAY_STEP, RT_SHADOWS_ON_REVERSE, and subframe_count.

Referenced by shader_template.

template<int SHADOWS_ON>
__device__ __inline__ void shade_light float3 &    result,
float3 &    hit_point,
float3 &    N,
float3 &    L,
float    p_Kd,
float    p_Ks,
float    p_phong_exp,
float3 &    col,
float3 &    phongcol,
float    shadow_tmax
[static]
 

scene-wide shading property.

Definition at line 1590 of file OptiXShaders.cu.

References PerRayData_shadow::attenuation, dot, make_float3, ORT_RAY_STEP, result, REVERSE_RAY_LENGTH, REVERSE_RAY_STEP, and RT_SHADOWS_ON_REVERSE.

template<int CLIP_VIEW_ON, int HEADLIGHT_ON, int FOG_ON, int SHADOWS_ON, int AO_ON, int OUTLINE_ON, int REFLECTION_ON, int TRANSMISSION_ON>
__device__ void shader_template float3    p_obj_color,
float3    N,
float    p_Ka,
float    p_Kd,
float    p_Ks,
float    p_phong_exp,
float    p_reflectivity,
float    p_opacity,
float    p_outline,
float    p_outlinewidth,
int    p_transmode
[static]
 

material-specific shading property.

Definition at line 1681 of file OptiXShaders.cu.

References PerRayData_radiance::alpha, PerRayData_radiance::depth, DirectionalLight::dir, dot, colvar::f, fog_color, fog_coord, PerRayData_radiance::importance, length, make_float3, ORT_RAY_STEP, ORT_RAY_STEP2, PositionalLight::pos, PerRayData_radiance::result, result, rtDeclareVariable, shade_ambient_occlusion, sphere_fade_and_clip, and PerRayData_radiance::transcnt.

RT_PROGRAM void sphere_array_bounds int    primIdx,
float    result[6]
 

Definition at line 2432 of file OptiXShaders.cu.

References make_float3, result, and sphere_buffer.

RT_PROGRAM void sphere_array_color_bounds int    primIdx,
float    result[6]
 

Definition at line 2461 of file OptiXShaders.cu.

References make_float3, result, and sphere_color_buffer.

RT_PROGRAM void sphere_array_color_intersect int    primIdx
 

Definition at line 2449 of file OptiXShaders.cu.

References sphere_color_buffer, and sphere_intersect_hearn_baker2.

RT_PROGRAM void sphere_array_intersect int    primIdx
 

Definition at line 2419 of file OptiXShaders.cu.

References sphere_buffer, and sphere_intersect_hearn_baker2.

__device__ void sphere_fade_and_clip const float3 &    hit_point,
const float3 &    cam_pos,
float    fade_start,
float    fade_end,
float &    alpha
 

Definition at line 500 of file OptiXShaders.cu.

References length.

Referenced by any_hit_clip_sphere, and shader_template.

__host__ __device__ __inline__ void sphere_intersect_hearn_baker2 float3    center,
float    radius,
const float3 &    spcolor
[static]
 

Definition at line 2347 of file OptiXShaders.cu.

References dot.

Referenced by sphere_array_color_intersect, and sphere_array_intersect.

int __inline__ __device__ subframe_count   [static]
 

Definition at line 665 of file OptiXShaders.cu.

Referenced by shade_ambient_occlusion, vmd_camera_cubemap_general, vmd_camera_dome_general, vmd_camera_equirectangular_general, vmd_camera_oculus_rift_general, vmd_camera_orthographic_general, and vmd_camera_perspective_general.

template<unsigned int N>
__host__ __device__ __inline__ unsigned int tea unsigned int    val0,
unsigned int    val1
[static]
 

Definition at line 148 of file OptiXShaders.cu.

References n.

RT_PROGRAM void tricolor_bounds int    primIdx,
float    result[6]
 

Definition at line 2527 of file OptiXShaders.cu.

References generic_tri_bounds, result, and tricolor_buffer.

RT_PROGRAM void tricolor_intersect int    primIdx
 

Definition at line 2502 of file OptiXShaders.cu.

References n, and tricolor_buffer.

RT_PROGRAM void trimesh_c4u_n3b_v3f_bounds int    primIdx,
float    result[6]
 

Definition at line 2570 of file OptiXShaders.cu.

References generic_tri_bounds, result, and trimesh_c4u_n3b_v3f_buffer.

RT_PROGRAM void trimesh_c4u_n3b_v3f_intersect int    primIdx
 

Definition at line 2538 of file OptiXShaders.cu.

References n, and trimesh_c4u_n3b_v3f_buffer.

RT_PROGRAM void trimesh_n3b_v3f_bounds int    primIdx,
float    result[6]
 

Definition at line 2644 of file OptiXShaders.cu.

References generic_tri_bounds, result, and trimesh_n3b_v3f_buffer.

RT_PROGRAM void trimesh_n3b_v3f_intersect int    primIdx
 

Definition at line 2616 of file OptiXShaders.cu.

References n, and trimesh_n3b_v3f_buffer.

RT_PROGRAM void trimesh_n3f_v3f_bounds int    primIdx,
float    result[6]
 

Definition at line 2605 of file OptiXShaders.cu.

References generic_tri_bounds, result, and trimesh_n3f_v3f_buffer.

RT_PROGRAM void trimesh_n3f_v3f_intersect int    primIdx
 

Definition at line 2581 of file OptiXShaders.cu.

References n, and trimesh_n3f_v3f_buffer.

RT_PROGRAM void trimesh_v3f_bounds int    primIdx,
float    result[6]
 

Definition at line 2673 of file OptiXShaders.cu.

References generic_tri_bounds, result, and trimesh_v3f_buffer.

RT_PROGRAM void trimesh_v3f_intersect int    primIdx
 

Definition at line 2654 of file OptiXShaders.cu.

References n, and trimesh_v3f_buffer.

RT_PROGRAM void vmd_camera_cubemap  
 

Definition at line 827 of file OptiXShaders.cu.

RT_PROGRAM void vmd_camera_cubemap_dof  
 

Definition at line 831 of file OptiXShaders.cu.

template<int STEREO_ON, int DOF_ON>
__device__ __inline__ void vmd_camera_cubemap_general   [static]
 

Definition at line 697 of file OptiXShaders.cu.

References accumulate_color, PerRayData_radiance::depth, dof_ray, PerRayData_radiance::importance, jitter_offset2f, make_float2, make_float3, PerRayData_radiance::result, subframe_count, and PerRayData_radiance::transcnt.

RT_PROGRAM void vmd_camera_cubemap_stereo  
 

Definition at line 835 of file OptiXShaders.cu.

RT_PROGRAM void vmd_camera_cubemap_stereo_dof  
 

Definition at line 839 of file OptiXShaders.cu.

template<int STEREO_ON, int DOF_ON>
__device__ __inline__ void vmd_camera_dome_general   [static]
 

Definition at line 851 of file OptiXShaders.cu.

References accumulate_color, PerRayData_radiance::alpha, PerRayData_radiance::depth, dof_ray, PerRayData_radiance::importance, jitter_offset2f, make_float2, make_float3, PerRayData_radiance::result, subframe_count, and PerRayData_radiance::transcnt.

RT_PROGRAM void vmd_camera_dome_master  
 

Definition at line 965 of file OptiXShaders.cu.

RT_PROGRAM void vmd_camera_dome_master_dof  
 

Definition at line 969 of file OptiXShaders.cu.

RT_PROGRAM void vmd_camera_dome_master_stereo  
 

Definition at line 973 of file OptiXShaders.cu.

RT_PROGRAM void vmd_camera_dome_master_stereo_dof  
 

Definition at line 977 of file OptiXShaders.cu.

RT_PROGRAM void vmd_camera_equirectangular  
 

Definition at line 1076 of file OptiXShaders.cu.

RT_PROGRAM void vmd_camera_equirectangular_dof  
 

Definition at line 1080 of file OptiXShaders.cu.

template<int STEREO_ON, int DOF_ON>
__device__ __inline__ void vmd_camera_equirectangular_general   [static]
 

Definition at line 990 of file OptiXShaders.cu.

References accumulate_color, PerRayData_radiance::depth, dof_ray, PerRayData_radiance::importance, jitter_offset2f, make_float2, make_float3, PerRayData_radiance::result, subframe_count, and PerRayData_radiance::transcnt.

RT_PROGRAM void vmd_camera_equirectangular_stereo  
 

Definition at line 1084 of file OptiXShaders.cu.

RT_PROGRAM void vmd_camera_equirectangular_stereo_dof  
 

Definition at line 1088 of file OptiXShaders.cu.

RT_PROGRAM void vmd_camera_oculus_rift  
 

Definition at line 1206 of file OptiXShaders.cu.

RT_PROGRAM void vmd_camera_oculus_rift_dof  
 

Definition at line 1210 of file OptiXShaders.cu.

template<int STEREO_ON, int DOF_ON>
__device__ __inline__ void vmd_camera_oculus_rift_general   [static]
 

Definition at line 1098 of file OptiXShaders.cu.

References accumulate_color, PerRayData_radiance::depth, dof_ray, PerRayData_radiance::importance, jitter_offset2f, make_float2, make_float3, PerRayData_radiance::result, subframe_count, and PerRayData_radiance::transcnt.

RT_PROGRAM void vmd_camera_oculus_rift_stereo  
 

Definition at line 1214 of file OptiXShaders.cu.

RT_PROGRAM void vmd_camera_oculus_rift_stereo_dof  
 

Definition at line 1218 of file OptiXShaders.cu.

RT_PROGRAM void vmd_camera_orthographic  
 

Definition at line 1411 of file OptiXShaders.cu.

RT_PROGRAM void vmd_camera_orthographic_dof  
 

Definition at line 1415 of file OptiXShaders.cu.

template<int STEREO_ON, int DOF_ON>
__device__ __inline__ void vmd_camera_orthographic_general   [static]
 

Definition at line 1330 of file OptiXShaders.cu.

References accumulate_color, PerRayData_radiance::alpha, PerRayData_radiance::depth, dof_ray, PerRayData_radiance::importance, jitter_offset2f, make_float2, make_float3, PerRayData_radiance::result, subframe_count, and PerRayData_radiance::transcnt.

RT_PROGRAM void vmd_camera_orthographic_stereo  
 

Definition at line 1419 of file OptiXShaders.cu.

RT_PROGRAM void vmd_camera_orthographic_stereo_dof  
 

Definition at line 1423 of file OptiXShaders.cu.

RT_PROGRAM void vmd_camera_perspective  
 

Definition at line 1308 of file OptiXShaders.cu.

RT_PROGRAM void vmd_camera_perspective_dof  
 

Definition at line 1312 of file OptiXShaders.cu.

template<int STEREO_ON, int DOF_ON>
__device__ __inline__ void vmd_camera_perspective_general   [static]
 

Definition at line 1229 of file OptiXShaders.cu.

References accumulate_color, PerRayData_radiance::alpha, PerRayData_radiance::depth, dof_ray, PerRayData_radiance::importance, jitter_offset2f, make_float2, make_float3, PerRayData_radiance::result, subframe_count, and PerRayData_radiance::transcnt.

RT_PROGRAM void vmd_camera_perspective_stereo  
 

Definition at line 1316 of file OptiXShaders.cu.

RT_PROGRAM void vmd_camera_perspective_stereo_dof  
 

Definition at line 1320 of file OptiXShaders.cu.


Variable Documentation

rtBuffer<float4, 2> accumulation_buffer
 

Definition at line 165 of file OptiXShaders.cu.

Referenced by accumulate_color, clear_accumulation_buffer, and draw_accumulation_buffer.

rtBuffer<vmd_cylinder> cylinder_buffer
 

Definition at line 2123 of file OptiXShaders.cu.

Referenced by cylinder_array_bounds, and cylinder_array_intersect.

rtBuffer<vmd_cylinder_color> cylinder_color_buffer
 

Definition at line 2124 of file OptiXShaders.cu.

Referenced by cylinder_array_color_bounds, and cylinder_array_color_intersect.

rtBuffer<uchar4, 2> framebuffer
 

Definition at line 164 of file OptiXShaders.cu.

Referenced by draw_accumulation_buffer, exception, and glwin_init_exts.

rtBuffer<vmd_ring_color> ring_color_buffer
 

Definition at line 2127 of file OptiXShaders.cu.

Referenced by ring_array_color_bounds, and ring_array_color_intersect.

rtBuffer<vmd_sphere> sphere_buffer
 

Definition at line 2130 of file OptiXShaders.cu.

Referenced by sphere_array_bounds, and sphere_array_intersect.

rtBuffer<vmd_sphere_color> sphere_color_buffer
 

Definition at line 2131 of file OptiXShaders.cu.

Referenced by sphere_array_color_bounds, and sphere_array_color_intersect.

rtBuffer<vmd_tricolor> tricolor_buffer
 

Definition at line 2134 of file OptiXShaders.cu.

Referenced by tricolor_bounds, and tricolor_intersect.

rtBuffer<vmd_trimesh_c4u_n3b_v3f> trimesh_c4u_n3b_v3f_buffer
 

Definition at line 2135 of file OptiXShaders.cu.

Referenced by trimesh_c4u_n3b_v3f_bounds, and trimesh_c4u_n3b_v3f_intersect.

rtBuffer<vmd_trimesh_n3b_v3f> trimesh_n3b_v3f_buffer
 

Definition at line 2137 of file OptiXShaders.cu.

Referenced by trimesh_n3b_v3f_bounds, and trimesh_n3b_v3f_intersect.

rtBuffer<vmd_trimesh_n3f_v3f> trimesh_n3f_v3f_buffer
 

Definition at line 2136 of file OptiXShaders.cu.

Referenced by trimesh_n3f_v3f_bounds, and trimesh_n3f_v3f_intersect.

rtBuffer<vmd_trimesh_v3f> trimesh_v3f_buffer
 

Definition at line 2138 of file OptiXShaders.cu.

Referenced by trimesh_v3f_bounds, and trimesh_v3f_intersect.


Generated on Sat Apr 20 02:44:15 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002