David Catuhe vor 5 Jahren
Ursprung
Commit
608f3c6c8a

+ 4 - 0
Playground/babylon.d.txt

@@ -53338,6 +53338,10 @@ declare module BABYLON {
         */
         */
         readonly glossiness: NodeMaterialConnectionPoint;
         readonly glossiness: NodeMaterialConnectionPoint;
         /**
         /**
+        * Gets the glossinness power component
+        */
+        readonly glossPower: NodeMaterialConnectionPoint;
+        /**
         * Gets the diffuse color component
         * Gets the diffuse color component
         */
         */
         readonly diffuseColor: NodeMaterialConnectionPoint;
         readonly diffuseColor: NodeMaterialConnectionPoint;

+ 4 - 0
dist/preview release/babylon.d.ts

@@ -54176,6 +54176,10 @@ declare module BABYLON {
         */
         */
         readonly glossiness: NodeMaterialConnectionPoint;
         readonly glossiness: NodeMaterialConnectionPoint;
         /**
         /**
+        * Gets the glossinness power component
+        */
+        readonly glossPower: NodeMaterialConnectionPoint;
+        /**
         * Gets the diffuse color component
         * Gets the diffuse color component
         */
         */
         readonly diffuseColor: NodeMaterialConnectionPoint;
         readonly diffuseColor: NodeMaterialConnectionPoint;

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 1
dist/preview release/babylon.js


Datei-Diff unterdrückt, da er zu groß ist
+ 60 - 49
dist/preview release/babylon.max.js


Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 1
dist/preview release/babylon.max.js.map


+ 8 - 0
dist/preview release/babylon.module.d.ts

@@ -56810,6 +56810,10 @@ declare module "babylonjs/Materials/Node/Blocks/Dual/lightBlock" {
         */
         */
         readonly glossiness: NodeMaterialConnectionPoint;
         readonly glossiness: NodeMaterialConnectionPoint;
         /**
         /**
+        * Gets the glossinness power component
+        */
+        readonly glossPower: NodeMaterialConnectionPoint;
+        /**
         * Gets the diffuse color component
         * Gets the diffuse color component
         */
         */
         readonly diffuseColor: NodeMaterialConnectionPoint;
         readonly diffuseColor: NodeMaterialConnectionPoint;
@@ -120569,6 +120573,10 @@ declare module BABYLON {
         */
         */
         readonly glossiness: NodeMaterialConnectionPoint;
         readonly glossiness: NodeMaterialConnectionPoint;
         /**
         /**
+        * Gets the glossinness power component
+        */
+        readonly glossPower: NodeMaterialConnectionPoint;
+        /**
         * Gets the diffuse color component
         * Gets the diffuse color component
         */
         */
         readonly diffuseColor: NodeMaterialConnectionPoint;
         readonly diffuseColor: NodeMaterialConnectionPoint;

+ 4 - 0
dist/preview release/documentation.d.ts

@@ -54176,6 +54176,10 @@ declare module BABYLON {
         */
         */
         readonly glossiness: NodeMaterialConnectionPoint;
         readonly glossiness: NodeMaterialConnectionPoint;
         /**
         /**
+        * Gets the glossinness power component
+        */
+        readonly glossPower: NodeMaterialConnectionPoint;
+        /**
         * Gets the diffuse color component
         * Gets the diffuse color component
         */
         */
         readonly diffuseColor: NodeMaterialConnectionPoint;
         readonly diffuseColor: NodeMaterialConnectionPoint;

+ 8 - 0
dist/preview release/viewer/babylon.module.d.ts

@@ -56810,6 +56810,10 @@ declare module "babylonjs/Materials/Node/Blocks/Dual/lightBlock" {
         */
         */
         readonly glossiness: NodeMaterialConnectionPoint;
         readonly glossiness: NodeMaterialConnectionPoint;
         /**
         /**
+        * Gets the glossinness power component
+        */
+        readonly glossPower: NodeMaterialConnectionPoint;
+        /**
         * Gets the diffuse color component
         * Gets the diffuse color component
         */
         */
         readonly diffuseColor: NodeMaterialConnectionPoint;
         readonly diffuseColor: NodeMaterialConnectionPoint;
@@ -120569,6 +120573,10 @@ declare module BABYLON {
         */
         */
         readonly glossiness: NodeMaterialConnectionPoint;
         readonly glossiness: NodeMaterialConnectionPoint;
         /**
         /**
+        * Gets the glossinness power component
+        */
+        readonly glossPower: NodeMaterialConnectionPoint;
+        /**
         * Gets the diffuse color component
         * Gets the diffuse color component
         */
         */
         readonly diffuseColor: NodeMaterialConnectionPoint;
         readonly diffuseColor: NodeMaterialConnectionPoint;

Datei-Diff unterdrückt, da er zu groß ist
+ 5 - 5
dist/preview release/viewer/babylon.viewer.js


Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js


+ 1 - 0
nodeEditor/src/components/diagram/port/defaultPortWidget.tsx

@@ -23,6 +23,7 @@ export class DefaultPortWidget extends BaseWidget<IDefaultPortWidgetProps, PortS
 	render() {
 	render() {
 		return (
 		return (
 			<div
 			<div
+				title={this.props.name}
 				style={this.props.style}
 				style={this.props.style}
 				{...this.getProps()}
 				{...this.getProps()}
 				onMouseEnter={() => {
 				onMouseEnter={() => {

+ 11 - 3
src/Materials/Node/Blocks/Dual/lightBlock.ts

@@ -45,6 +45,7 @@ export class LightBlock extends NodeMaterialBlock {
         this.registerInput("worldNormal", NodeMaterialBlockConnectionPointTypes.Vector4, false, NodeMaterialBlockTargets.Fragment);
         this.registerInput("worldNormal", NodeMaterialBlockConnectionPointTypes.Vector4, false, NodeMaterialBlockTargets.Fragment);
         this.registerInput("cameraPosition", NodeMaterialBlockConnectionPointTypes.Vector3, false, NodeMaterialBlockTargets.Fragment);
         this.registerInput("cameraPosition", NodeMaterialBlockConnectionPointTypes.Vector3, false, NodeMaterialBlockTargets.Fragment);
         this.registerInput("glossiness", NodeMaterialBlockConnectionPointTypes.Float, true, NodeMaterialBlockTargets.Fragment);
         this.registerInput("glossiness", NodeMaterialBlockConnectionPointTypes.Float, true, NodeMaterialBlockTargets.Fragment);
+        this.registerInput("glossPower", NodeMaterialBlockConnectionPointTypes.Float, true, NodeMaterialBlockTargets.Fragment);
         this.registerInput("diffuseColor", NodeMaterialBlockConnectionPointTypes.Color3, true, NodeMaterialBlockTargets.Fragment);
         this.registerInput("diffuseColor", NodeMaterialBlockConnectionPointTypes.Color3, true, NodeMaterialBlockTargets.Fragment);
         this.registerInput("specularColor", NodeMaterialBlockConnectionPointTypes.Color3, true, NodeMaterialBlockTargets.Fragment);
         this.registerInput("specularColor", NodeMaterialBlockConnectionPointTypes.Color3, true, NodeMaterialBlockTargets.Fragment);
 
 
@@ -89,17 +90,24 @@ export class LightBlock extends NodeMaterialBlock {
     }
     }
 
 
     /**
     /**
+    * Gets the glossinness power component
+    */
+    public get glossPower(): NodeMaterialConnectionPoint {
+        return this._inputs[4];
+    }
+
+    /**
     * Gets the diffuse color component
     * Gets the diffuse color component
     */
     */
     public get diffuseColor(): NodeMaterialConnectionPoint {
     public get diffuseColor(): NodeMaterialConnectionPoint {
-        return this._inputs[4];
+        return this._inputs[5];
     }
     }
 
 
     /**
     /**
     * Gets the specular color component
     * Gets the specular color component
     */
     */
     public get specularColor(): NodeMaterialConnectionPoint {
     public get specularColor(): NodeMaterialConnectionPoint {
-        return this._inputs[5];
+        return this._inputs[6];
     }
     }
 
 
     /**
     /**
@@ -271,7 +279,7 @@ export class LightBlock extends NodeMaterialBlock {
             }
             }
             state.compilationString += `lightingInfo info;\r\n`;
             state.compilationString += `lightingInfo info;\r\n`;
             state.compilationString += `float shadow = 1.;\r\n`;
             state.compilationString += `float shadow = 1.;\r\n`;
-            state.compilationString += `float glossiness = pow(${this.glossiness.isConnected ? this.glossiness.associatedVariableName : "1.0"}, 4.0) * 1024.0;\r\n`;
+            state.compilationString += `float glossiness = ${this.glossiness.isConnected ? this.glossiness.associatedVariableName : "1.0"} * ${this.glossPower.isConnected ? this.glossPower.associatedVariableName : "1024.0"};\r\n`;
             state.compilationString += `vec3 diffuseBase = vec3(0., 0., 0.);\r\n`;
             state.compilationString += `vec3 diffuseBase = vec3(0., 0., 0.);\r\n`;
             state.compilationString += `vec3 specularBase = vec3(0., 0., 0.);\r\n`;
             state.compilationString += `vec3 specularBase = vec3(0., 0., 0.);\r\n`;
             state.compilationString += `vec3 normalW = ${this.worldNormal.associatedVariableName}.xyz;\r\n`;
             state.compilationString += `vec3 normalW = ${this.worldNormal.associatedVariableName}.xyz;\r\n`;