unfixed y control

This commit is contained in:
spatialfree 2022-08-20 11:22:37 -04:00
parent 4022a93ad1
commit 0879701456
8 changed files with 24 additions and 1884 deletions

View file

@ -76,9 +76,28 @@ float raymarch(float3 ro, float3 rd) {
return dist;
}
// float4 read(float2 head, float x, float y) {
// head += float2(x, y);
// return diffuse.Sample(tex, head);
// }
float4 ps(psIn input) : SV_TARGET {
float4 col = diffuse.Sample(diffuse_s, input.uv);
// float2 head = float2(0, 0);
// if (read(head, 0, 0).r > 0) {
// float4x4 m = float4x4(
// diffuse.Sample(tex, head + float2(1, 0)),
// diffuse.Sample(tex, head + float2(2, 0)),
// diffuse.Sample(tex, head + float2(3, 0)),
// diffuse.Sample(tex, head + float2(4, 0))
// );
// }
// float3 dim = float3(
// diffuse.Sample(tex, head + float2(1, 0)),
// );
float3 ro = input.campos;
float3 rd = normalize(input.world - ro);

View file

@ -1,11 +0,0 @@
Model Information:
* title: Southbank Undercroft Skatepark
* source: https://sketchfab.com/3d-models/southbank-undercroft-skatepark-add37d5dc6a2456eb0d7607c6fbd884d
* author: artfletch (https://sketchfab.com/artfletch)
Model License:
* license type: CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
* requirements: Author must be credited. Commercial use is allowed.
If you use this 3D model in your project be sure to copy paste this credit wherever you share it:
This work is based on "Southbank Undercroft Skatepark" (https://sketchfab.com/3d-models/southbank-undercroft-skatepark-add37d5dc6a2456eb0d7607c6fbd884d) by artfletch (https://sketchfab.com/artfletch) licensed under CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 MiB

View file

@ -66,7 +66,7 @@ public class Mono {
rig.lCon.device.stick.y
);
if (input.MagnitudeSq > 0.01f) {
offset += Quat.FromAngles(0, angle.y, 0).Inverse * input * Time.Elapsedf;
offset += (Quat.FromAngles(0, angle.y, 0).Inverse * rig.lCon.ori).Normalized * input * Time.Elapsedf;
}
@ -74,12 +74,12 @@ public class Mono {
// Oriel
float scale = oriel.scale * oriel.multiplier;
if (oriel.scaleHeight) {
if (oriel.scaleWithHeight) {
scale *= oriel.bounds.dimensions.y;
}
Matrix simMatrix = Matrix.TRS(
new Vec3(0, -oriel.bounds.dimensions.y / 2.01f, 0),
Vec3.Zero, // -oriel.bounds.dimensions.y / 2.01f
Quat.FromAngles(0, angle.y, 0),
Vec3.One * scale
);

View file

@ -93,7 +93,7 @@ public class Mono {
if (UI.Button("Reset Oriel Quat")) { oriel.ori = Quat.Identity; }
// if (UI.Button("Draw Oriel Axis")) { oriel.drawAxis = !oriel.drawAxis; }
if (UI.Button("Scale w/Height")) { oriel.scaleHeight = !oriel.scaleHeight; }
if (UI.Button("Scale w/Height")) { oriel.scaleWithHeight = !oriel.scaleWithHeight; }
UI.HSlider("Scale", ref oriel.scale, 0.1f, 1f, 0.1f);
UI.HSlider("Multiplier", ref oriel.multiplier, 0.1f, 1f, 0.1f);

View file

@ -15,7 +15,7 @@ public class Oriel {
public Quat ori = Quat.Identity;
// inner matrix
public bool scaleHeight = true;
public bool scaleWithHeight = false;
public float scale = 0.5f;
public float multiplier = 1f;