feat: modules moved and engine moved to submodule
This commit is contained in:
parent
dfb5e645cd
commit
c33d2130cc
5136 changed files with 225275 additions and 64485 deletions
|
|
@ -240,15 +240,15 @@ RID RenderingServer::_make_test_cube() {
|
|||
RID RenderingServer::make_sphere_mesh(int p_lats, int p_lons, real_t p_radius) {
|
||||
Vector<Vector3> vertices;
|
||||
Vector<Vector3> normals;
|
||||
const double lat_step = Math_TAU / p_lats;
|
||||
const double lon_step = Math_TAU / p_lons;
|
||||
const double lat_step = Math::TAU / p_lats;
|
||||
const double lon_step = Math::TAU / p_lons;
|
||||
|
||||
for (int i = 1; i <= p_lats; i++) {
|
||||
double lat0 = lat_step * (i - 1) - Math_TAU / 4;
|
||||
double lat0 = lat_step * (i - 1) - Math::TAU / 4;
|
||||
double z0 = Math::sin(lat0);
|
||||
double zr0 = Math::cos(lat0);
|
||||
|
||||
double lat1 = lat_step * i - Math_TAU / 4;
|
||||
double lat1 = lat_step * i - Math::TAU / 4;
|
||||
double z1 = Math::sin(lat1);
|
||||
double zr1 = Math::cos(lat1);
|
||||
|
||||
|
|
@ -327,9 +327,9 @@ void _get_axis_angle(const Vector3 &p_normal, const Vector4 &p_tangent, float &r
|
|||
r_angle = float(angle);
|
||||
|
||||
if (d < 0.0) {
|
||||
r_angle = CLAMP((1.0 - r_angle / Math_PI) * 0.5, 0.0, 0.49999);
|
||||
r_angle = CLAMP((1.0 - r_angle / Math::PI) * 0.5, 0.0, 0.49999);
|
||||
} else {
|
||||
r_angle = CLAMP((r_angle / Math_PI) * 0.5 + 0.5, 0.500008, 1.0);
|
||||
r_angle = CLAMP((r_angle / Math::PI) * 0.5 + 0.5, 0.500008, 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -337,7 +337,7 @@ void _get_axis_angle(const Vector3 &p_normal, const Vector4 &p_tangent, float &r
|
|||
// and p_angle includes the binormal direction.
|
||||
void _get_tbn_from_axis_angle(const Vector3 &p_axis, float p_angle, Vector3 &r_normal, Vector4 &r_tangent) {
|
||||
float binormal_sign = p_angle > 0.5 ? 1.0 : -1.0;
|
||||
float angle = Math::abs(p_angle * 2.0 - 1.0) * Math_PI;
|
||||
float angle = Math::abs(p_angle * 2.0 - 1.0) * Math::PI;
|
||||
|
||||
Basis tbn = Basis(p_axis, angle);
|
||||
Vector3 tan = tbn.rows[0];
|
||||
|
|
@ -924,7 +924,7 @@ Error RenderingServer::_surface_set_data(Array p_arrays, uint64_t p_format, uint
|
|||
// Create AABBs for each detected bone.
|
||||
int total_bones = max_bone + 1;
|
||||
|
||||
bool first = r_bone_aabb.size() == 0;
|
||||
bool first = r_bone_aabb.is_empty();
|
||||
|
||||
r_bone_aabb.resize(total_bones);
|
||||
|
||||
|
|
@ -1317,8 +1317,7 @@ Error RenderingServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surfa
|
|||
}
|
||||
Vector<SurfaceData::LOD> lods;
|
||||
if (index_array_len) {
|
||||
List<Variant> keys;
|
||||
p_lods.get_key_list(&keys);
|
||||
LocalVector<Variant> keys = p_lods.get_key_list();
|
||||
keys.sort(); // otherwise lod levels may get skipped
|
||||
for (const Variant &E : keys) {
|
||||
float distance = E;
|
||||
|
|
@ -3026,6 +3025,7 @@ void RenderingServer::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("environment_set_ssr", "env", "enable", "max_steps", "fade_in", "fade_out", "depth_tolerance"), &RenderingServer::environment_set_ssr);
|
||||
ClassDB::bind_method(D_METHOD("environment_set_ssao", "env", "enable", "radius", "intensity", "power", "detail", "horizon", "sharpness", "light_affect", "ao_channel_affect"), &RenderingServer::environment_set_ssao);
|
||||
ClassDB::bind_method(D_METHOD("environment_set_fog", "env", "enable", "light_color", "light_energy", "sun_scatter", "density", "height", "height_density", "aerial_perspective", "sky_affect", "fog_mode"), &RenderingServer::environment_set_fog, DEFVAL(RS::ENV_FOG_MODE_EXPONENTIAL));
|
||||
ClassDB::bind_method(D_METHOD("environment_set_fog_depth", "env", "curve", "begin", "end"), &RenderingServer::environment_set_fog_depth);
|
||||
ClassDB::bind_method(D_METHOD("environment_set_sdfgi", "env", "enable", "cascades", "min_cell_size", "y_scale", "use_occlusion", "bounce_feedback", "read_sky", "energy", "normal_bias", "probe_bias"), &RenderingServer::environment_set_sdfgi);
|
||||
ClassDB::bind_method(D_METHOD("environment_set_volumetric_fog", "env", "enable", "density", "albedo", "emission", "emission_energy", "anisotropy", "length", "p_detail_spread", "gi_inject", "temporal_reprojection", "temporal_reprojection_amount", "ambient_inject", "sky_affect"), &RenderingServer::environment_set_volumetric_fog);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue