Merge pull request #20787 from Calinou/tweak-default-material-properties

Tweak the default SpatialMaterial properties
This commit is contained in:
Juan Linietsky 2018-08-08 09:44:31 -03:00 committed by GitHub
commit 913a7dbd8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 52 additions and 52 deletions

View file

@ -473,17 +473,17 @@ void main()
{ {
highp vec3 vertex = vertex_interp; highp vec3 vertex = vertex_interp;
vec3 albedo = vec3(0.8, 0.8, 0.8); vec3 albedo = vec3(1.0);
vec3 transmission = vec3(0.0); vec3 transmission = vec3(0.0);
float metallic = 0.0; float metallic = 0.0;
float specular = 0.5; float specular = 0.5;
vec3 emission = vec3(0.0, 0.0, 0.0); vec3 emission = vec3(0.0);
float roughness = 1.0; float roughness = 1.0;
float rim = 0.0; float rim = 0.0;
float rim_tint = 0.0; float rim_tint = 0.0;
float clearcoat = 0.0; float clearcoat = 0.0;
float clearcoat_gloss = 0.0; float clearcoat_gloss = 0.0;
float anisotropy = 1.0; float anisotropy = 0.0;
vec2 anisotropy_flow = vec2(1.0, 0.0); vec2 anisotropy_flow = vec2(1.0, 0.0);
float alpha = 1.0; float alpha = 1.0;

View file

@ -339,7 +339,7 @@ void main() {
#endif #endif
#endif #endif
float roughness=0.0; float roughness = 1.0;
//defines that make writing custom shaders easier //defines that make writing custom shaders easier
#define projection_matrix local_projection #define projection_matrix local_projection
@ -1608,17 +1608,17 @@ void main() {
//lay out everything, whathever is unused is optimized away anyway //lay out everything, whathever is unused is optimized away anyway
highp vec3 vertex = vertex_interp; highp vec3 vertex = vertex_interp;
vec3 albedo = vec3(0.8,0.8,0.8); vec3 albedo = vec3(1.0);
vec3 transmission = vec3(0.0); vec3 transmission = vec3(0.0);
float metallic = 0.0; float metallic = 0.0;
float specular = 0.5; float specular = 0.5;
vec3 emission = vec3(0.0,0.0,0.0); vec3 emission = vec3(0.0);
float roughness = 1.0; float roughness = 1.0;
float rim = 0.0; float rim = 0.0;
float rim_tint = 0.0; float rim_tint = 0.0;
float clearcoat = 0.0; float clearcoat = 0.0;
float clearcoat_gloss = 0.0; float clearcoat_gloss = 0.0;
float anisotropy = 1.0; float anisotropy = 0.0;
vec2 anisotropy_flow = vec2(1.0, 0.0); vec2 anisotropy_flow = vec2(1.0, 0.0);
#if defined(ENABLE_AO) #if defined(ENABLE_AO)

View file

@ -2106,10 +2106,10 @@ void SpatialMaterial::_bind_methods() {
SpatialMaterial::SpatialMaterial() : SpatialMaterial::SpatialMaterial() :
element(this) { element(this) {
//initialize to right values // Initialize to the same values as the shader
set_albedo(Color(1.0, 1.0, 1.0, 1.0)); set_albedo(Color(1.0, 1.0, 1.0, 1.0));
set_specular(0.5); set_specular(0.5);
set_roughness(0.0); set_roughness(1.0);
set_metallic(0.0); set_metallic(0.0);
set_emission(Color(0, 0, 0)); set_emission(Color(0, 0, 0));
set_emission_energy(1.0); set_emission_energy(1.0);