commit
2f221e5fd5
61 changed files with 94 additions and 94 deletions
|
|
@ -322,12 +322,12 @@ public:
|
|||
m_angularLimits[2].m_hiLimit = angularUpper.z;
|
||||
}
|
||||
|
||||
//! Retrieves the angular limit informacion
|
||||
//! Retrieves the angular limit information.
|
||||
G6DOFRotationalLimitMotor3DSW *getRotationalLimitMotor(int index) {
|
||||
return &m_angularLimits[index];
|
||||
}
|
||||
|
||||
//! Retrieves the limit informacion
|
||||
//! Retrieves the limit information.
|
||||
G6DOFTranslationalLimitMotor3DSW *getTranslationalLimitMotor() {
|
||||
return &m_linearLimits;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ void SliderJoint3DSW::solve(real_t p_step) {
|
|||
real_t softness = (i) ? m_softnessOrthoLin : (m_solveLinLim ? m_softnessLimLin : m_softnessDirLin);
|
||||
real_t restitution = (i) ? m_restitutionOrthoLin : (m_solveLinLim ? m_restitutionLimLin : m_restitutionDirLin);
|
||||
real_t damping = (i) ? m_dampingOrthoLin : (m_solveLinLim ? m_dampingLimLin : m_dampingDirLin);
|
||||
// calcutate and apply impulse
|
||||
// Calculate and apply impulse.
|
||||
real_t normalImpulse = softness * (restitution * depth / p_step - damping * rel_vel) * m_jacLinDiagABInv[i];
|
||||
Vector3 impulse_vector = normal * normalImpulse;
|
||||
if (dynamic_A) {
|
||||
|
|
|
|||
|
|
@ -620,7 +620,7 @@ void RendererCanvasRenderRD::_render_item(RD::DrawListID p_draw_list, RID p_rend
|
|||
RD::get_singleton()->draw_list_bind_index_array(p_draw_list, shader.quad_index_array);
|
||||
RD::get_singleton()->draw_list_draw(p_draw_list, true);
|
||||
|
||||
//restore if overrided
|
||||
// Restore if overridden.
|
||||
push_constant.color_texture_pixel_size[0] = texpixel_size.x;
|
||||
push_constant.color_texture_pixel_size[1] = texpixel_size.y;
|
||||
|
||||
|
|
|
|||
|
|
@ -2250,7 +2250,7 @@ bool RendererSceneRenderRD::_render_buffers_can_be_storage() {
|
|||
}
|
||||
|
||||
void RendererSceneRenderRD::render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_width, int p_height, RS::ViewportMSAA p_msaa, RenderingServer::ViewportScreenSpaceAA p_screen_space_aa, bool p_use_debanding, uint32_t p_view_count) {
|
||||
ERR_FAIL_COND_MSG(p_view_count == 0, "Must have atleast 1 view");
|
||||
ERR_FAIL_COND_MSG(p_view_count == 0, "Must have at least 1 view");
|
||||
|
||||
RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
|
||||
rb->width = p_width;
|
||||
|
|
|
|||
|
|
@ -571,7 +571,7 @@ String ShaderCompilerRD::_dump_node_code(const SL::Node *p_node, int p_level, Ge
|
|||
max_texture_uniforms++;
|
||||
} else {
|
||||
if (E->get().scope == SL::ShaderNode::Uniform::SCOPE_INSTANCE) {
|
||||
continue; //instances are indexed directly, dont need index uniforms
|
||||
continue; // Instances are indexed directly, don't need index uniforms.
|
||||
}
|
||||
|
||||
max_uniforms++;
|
||||
|
|
@ -605,7 +605,7 @@ String ShaderCompilerRD::_dump_node_code(const SL::Node *p_node, int p_level, Ge
|
|||
if (uniform.scope == SL::ShaderNode::Uniform::SCOPE_INSTANCE) {
|
||||
//insert, but don't generate any code.
|
||||
p_actions.uniforms->insert(uniform_name, uniform);
|
||||
continue; //instances are indexed directly, dont need index uniforms
|
||||
continue; // Instances are indexed directly, don't need index uniforms.
|
||||
}
|
||||
if (SL::is_sampler_type(uniform.type)) {
|
||||
ucode = "layout(set = " + itos(actions.texture_layout_set) + ", binding = " + itos(actions.base_texture_binding_index + uniform.texture_order) + ") uniform ";
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ void main() {
|
|||
if (bool(particles.data[particle].flags & PARTICLE_FLAG_ACTIVE) || bool(particles.data[particle].flags & PARTICLE_FLAG_TRAILED)) {
|
||||
txform = particles.data[particle].xform;
|
||||
if (params.trail_size > 1) {
|
||||
// since the steps dont fit precisely in the history frames, must do a tiny bit of
|
||||
// Since the steps don't fit precisely in the history frames, must do a tiny bit of
|
||||
// interpolation to get them close to their intended location.
|
||||
uint part_ofs = particle % params.trail_size;
|
||||
float natural_ofs = fract((float(part_ofs) / float(params.trail_size)) * float(params.trail_total)) * params.frame_delta;
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ layout(set = 1, binding = 0, std140) uniform SceneData {
|
|||
uint cluster_type_size;
|
||||
uint max_cluster_element_count_div_32;
|
||||
|
||||
//use vec4s because std140 doesnt play nice with vec2s, z and w are wasted
|
||||
// Use vec4s because std140 doesn't play nice with vec2s, z and w are wasted.
|
||||
vec4 directional_penumbra_shadow_kernel[32];
|
||||
vec4 directional_soft_shadow_kernel[32];
|
||||
vec4 penumbra_shadow_kernel[32];
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ layout(set = 1, binding = 0, std140) uniform SceneData {
|
|||
vec2 viewport_size;
|
||||
vec2 screen_pixel_size;
|
||||
|
||||
//use vec4s because std140 doesnt play nice with vec2s, z and w are wasted
|
||||
// Use vec4s because std140 doesn't play nice with vec2s, z and w are wasted.
|
||||
vec4 directional_penumbra_shadow_kernel[32];
|
||||
vec4 directional_soft_shadow_kernel[32];
|
||||
vec4 penumbra_shadow_kernel[32];
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ layout(set = 0, binding = 3, std430) restrict readonly buffer DispatchData {
|
|||
dispatch_data;
|
||||
|
||||
struct ProcessVoxel {
|
||||
uint position; //xyz 7 bit packed, extra 11 bits for neigbours
|
||||
uint albedo; //rgb bits 0-15 albedo, bits 16-21 are normal bits (set if geometry exists toward that side), extra 11 bits for neibhbours
|
||||
uint light; //rgbe8985 encoded total saved light, extra 2 bits for neighbours
|
||||
uint light_aniso; //55555 light anisotropy, extra 2 bits for neighbours
|
||||
uint position; // xyz 7 bit packed, extra 11 bits for neighbors.
|
||||
uint albedo; // rgb bits 0-15 albedo, bits 16-21 are normal bits (set if geometry exists toward that side), extra 11 bits for neighbors.
|
||||
uint light; // rgbe8985 encoded total saved light, extra 2 bits for neighbors.
|
||||
uint light_aniso; // 55555 light anisotropy, extra 2 bits for neighbors.
|
||||
//total neighbours: 26
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -266,9 +266,9 @@ void main() {
|
|||
|
||||
} else if (params.sky_mode == SKY_MODE_SKY) {
|
||||
#ifdef USE_CUBEMAP_ARRAY
|
||||
light.rgb = textureLod(samplerCubeArray(sky_irradiance, linear_sampler_mipmaps), vec4(ray_dir, 0.0), 2.0).rgb; //use second mipmap because we dont usually throw a lot of rays, so this compensates
|
||||
light.rgb = textureLod(samplerCubeArray(sky_irradiance, linear_sampler_mipmaps), vec4(ray_dir, 0.0), 2.0).rgb; // Use second mipmap because we don't usually throw a lot of rays, so this compensates.
|
||||
#else
|
||||
light.rgb = textureLod(samplerCube(sky_irradiance, linear_sampler_mipmaps), ray_dir, 2.0).rgb; //use second mipmap because we dont usually throw a lot of rays, so this compensates
|
||||
light.rgb = textureLod(samplerCube(sky_irradiance, linear_sampler_mipmaps), ray_dir, 2.0).rgb; // Use second mipmap because we don't usually throw a lot of rays, so this compensates.
|
||||
#endif
|
||||
light.rgb *= params.sky_energy;
|
||||
light.a = 0.0;
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ layout(set = 0, binding = 10, std430) restrict buffer DispatchData {
|
|||
dispatch_data;
|
||||
|
||||
struct ProcessVoxel {
|
||||
uint position; //xyz 7 bit packed, extra 11 bits for neigbours
|
||||
uint position; // xyz 7 bit packed, extra 11 bits for neighbors.
|
||||
uint albedo; //rgb bits 0-15 albedo, bits 16-21 are normal bits (set if geometry exists toward that side), extra 11 bits for neibhbours
|
||||
uint light; //rgbe8985 encoded total saved light, extra 2 bits for neighbours
|
||||
uint light_aniso; //55555 light anisotropy, extra 2 bits for neighbours
|
||||
|
|
@ -134,7 +134,7 @@ layout(set = 0, binding = 5, std430) restrict buffer readonly DispatchData {
|
|||
dispatch_data;
|
||||
|
||||
struct ProcessVoxel {
|
||||
uint position; //xyz 7 bit packed, extra 11 bits for neigbours
|
||||
uint position; // xyz 7 bit packed, extra 11 bits for neighbors.
|
||||
uint albedo; //rgb bits 0-15 albedo, bits 16-21 are normal bits (set if geometry exists toward that side), extra 11 bits for neibhbours
|
||||
uint light; //rgbe8985 encoded total saved light, extra 2 bits for neighbours
|
||||
uint light_aniso; //55555 light anisotropy, extra 2 bits for neighbours
|
||||
|
|
@ -183,7 +183,7 @@ void main() {
|
|||
ivec3 write_pos = read_pos + params.scroll;
|
||||
|
||||
if (any(lessThan(write_pos, ivec3(0))) || any(greaterThanEqual(write_pos, ivec3(params.grid_size)))) {
|
||||
return; //fits outside the 3D texture, dont do anything
|
||||
return; // Fits outside the 3D texture, don't do anything.
|
||||
}
|
||||
|
||||
uint albedo = ((src_process_voxels.data[index].albedo & 0x7FFF) << 1) | 1; //add solid bit
|
||||
|
|
|
|||
|
|
@ -1259,7 +1259,7 @@ void RendererSceneCull::_update_instance_visibility_depth(Instance *p_instance)
|
|||
}
|
||||
|
||||
if (cycle_detected) {
|
||||
ERR_PRINT("Cycle detected in the visibility dependecies tree.");
|
||||
ERR_PRINT("Cycle detected in the visibility dependencies tree.");
|
||||
for (Set<Instance *>::Element *E = traversed_nodes.front(); E; E = E->next()) {
|
||||
Instance *instance = E->get();
|
||||
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(instance->base_data);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ struct BlitToScreen;
|
|||
/**
|
||||
@author Bastiaan Olij <mux213@gmail.com>
|
||||
|
||||
The XR interface is a template class ontop of which we build interface to different AR, VR and tracking SDKs.
|
||||
The XR interface is a template class on top of which we build interface to different AR, VR and tracking SDKs.
|
||||
The idea is that we subclass this class, implement the logic, and then instantiate a singleton of each interface
|
||||
when Godot starts. These instances do not initialize themselves but register themselves with the AR/VR server.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue