Skip to content

Commit 96b7906

Browse files
committed
fix diffuse ibl
1 parent 1fb9a5d commit 96b7906

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

python/py_package/core/pysapien/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1674,7 +1674,7 @@ class Scene():
16741674
def add_active_light(self, pose: Pose, color: numpy.ndarray[numpy.float32], fov: float, tex_path: str, near: float = 0.10000000149011612, far: float = 10.0, shadow_map_size: int = 2048) -> ActiveLightEntity: ...
16751675
def add_camera(self, name: str, width: int, height: int, fovy: float, near: float, far: float) -> CameraEntity: ...
16761676
def add_directional_light(self, direction: numpy.ndarray[numpy.float32], color: numpy.ndarray[numpy.float32], shadow: bool = False, position: numpy.ndarray[numpy.float32] = array([0., 0., 0.], dtype=float32), scale: float = 10.0, near: float = -10.0, far: float = 10.0, shadow_map_size: int = 2048) -> DirectionalLightEntity: ...
1677-
def add_ground(self, altitude: float, render: bool = True, material: PhysicalMaterial = None, render_material: RenderMaterial = None, render_half_size: numpy.ndarray[numpy.float32] = array([10., 10.], dtype=float32)) -> None: ...
1677+
def add_ground(self, altitude: float, render: bool = True, material: PhysicalMaterial = None, render_material: RenderMaterial = None, render_half_size: numpy.ndarray[numpy.float32] = array([10., 10.], dtype=float32)) -> ActorStatic: ...
16781678
@typing.overload
16791679
def add_mounted_camera(self, name: str, actor: ActorBase, pose: Pose, width: int, height: int, fovx: float, fovy: float, near: float, far: float) -> CameraEntity: ...
16801680
@typing.overload

vulkan_shader/ibl/deferred.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ vec3 getBackgroundColor(vec3 texcoord) {
8080
vec3 diffuseIBL(vec3 albedo, vec3 N) {
8181
N = vec3(-N.y, N.z, -N.x);
8282
vec3 color = textureLod(samplerEnvironment, N, 5).rgb;
83-
return color * albedo;
83+
return color * albedo / 3.1415926535;
8484
}
8585

8686
vec3 specularIBL(vec3 fresnel, float roughness, vec3 N, vec3 V) {

vulkan_shader/ibl/gbuffer1.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ vec3 getBackgroundColor(vec3 texcoord) {
9292
vec3 diffuseIBL(vec3 albedo, vec3 N) {
9393
N = vec3(-N.y, N.z, -N.x);
9494
vec3 color = textureLod(samplerEnvironment, N, 5).rgb;
95-
return color * albedo;
95+
return color * albedo / 3.1415926535;
9696
}
9797

9898
vec3 specularIBL(vec3 fresnel, float roughness, vec3 N, vec3 V) {

vulkan_shader/point/composite1.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ vec4 world2camera(vec4 pos) {
8181
vec3 diffuseIBL(vec3 albedo, vec3 N) {
8282
N = vec3(-N.y, N.z, -N.x);
8383
vec3 color = textureLod(samplerEnvironment, N, 5).rgb;
84-
return color * albedo;
84+
return color * albedo / 3.1415926535;
8585
}
8686

8787
vec3 specularIBL(vec3 fresnel, float roughness, vec3 N, vec3 V) {

vulkan_shader/point/deferred.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ vec3 getBackgroundColor(vec3 texcoord) {
8080
vec3 diffuseIBL(vec3 albedo, vec3 N) {
8181
N = vec3(-N.y, N.z, -N.x);
8282
vec3 color = textureLod(samplerEnvironment, N, 5).rgb;
83-
return color * albedo;
83+
return color * albedo / 3.1415926535;
8484
}
8585

8686
vec3 specularIBL(vec3 fresnel, float roughness, vec3 N, vec3 V) {

0 commit comments

Comments
 (0)