daily uodate on 20240411 by nitload youmu, camera complete
This commit is contained in:
@@ -70,10 +70,10 @@ namespace StgSharp
|
||||
0.0f, 0.5f, 0.0f
|
||||
);
|
||||
Rectangle rec = new Rectangle(
|
||||
-0.75f, 0.75f, 0.0f,
|
||||
0.75f, 0.75f, 0.0f,
|
||||
0.75f, -0.75f, 0.0f,
|
||||
-0.75f, -0.75f, 0.0f
|
||||
-0.3f, 0.3f, 0.0f,
|
||||
0.3f, 0.3f, 0.0f,
|
||||
0.3f, -0.3f, 0.0f,
|
||||
-0.3f, -0.3f, 0.0f
|
||||
);
|
||||
Polygon5 polygon = new Polygon5(
|
||||
-0.4f, 0.5f, 0.0f,
|
||||
@@ -121,12 +121,20 @@ namespace StgSharp
|
||||
/**/
|
||||
|
||||
camera = new Camera(
|
||||
new vec3d(0,0,1.0f),
|
||||
new vec3d(1,1,1),
|
||||
new vec3d(0,0,0),
|
||||
new vec3d(0,1,0)
|
||||
);
|
||||
camera.Perspective(new Radius(Scaler.Pi / 3),this.Size,0.5f,-0.5f);
|
||||
camera.GainAllUniforms(shader, "projection", "lookAt");
|
||||
camera.SetViewRange(new Radius(Scaler.Pi / 2),this.Size,(0,0),(1f,1f));
|
||||
camera.GainAllUniforms(shader, "camera");
|
||||
/**/
|
||||
camera.Test(
|
||||
new vec4d(0.5f,0.5f,0, 1),
|
||||
new vec4d(0.5f, -0.5f, 0, 1),
|
||||
new vec4d(-0.5f, -0.5f, 0, 1),
|
||||
new vec4d(-0.5f, 0.5f, 0, 1)
|
||||
);
|
||||
/**/
|
||||
}
|
||||
|
||||
protected override void Main()
|
||||
@@ -149,6 +157,12 @@ namespace StgSharp
|
||||
/**/
|
||||
float time = CurrentFrameCount / 60.0f;
|
||||
|
||||
camera.SetViewDirection(
|
||||
new vec3d(Scaler.Cos(time * 10), 1, Scaler.Sin(time * 10)),
|
||||
new vec3d(0, 0, 0),
|
||||
new vec3d(0, 1, 0)
|
||||
);
|
||||
|
||||
GL.SetValue(color,
|
||||
0.5f + MathF.Cos(time),
|
||||
0.5f + MathF.Sin(time * 0.66667f + 2 * Scaler.Pi / 3),
|
||||
|
||||
@@ -8,8 +8,7 @@ out vec4 TexColor;
|
||||
out vec2 TexCoord;
|
||||
|
||||
uniform vec4 color;
|
||||
uniform mat4x4 lookAt;
|
||||
uniform mat4x4 projection;
|
||||
uniform mat4x4 camera;
|
||||
|
||||
void main()
|
||||
{
|
||||
@@ -21,10 +20,10 @@ void main()
|
||||
0,0,1,0,
|
||||
0,0,0,1
|
||||
);
|
||||
vec4 temp = (vec4(aPos.xyz,1.0) + vec4(color.yz-vec2(0.5,0.5),0.0,0.0)) * rotation;
|
||||
gl_Position = projection * lookAt * temp;
|
||||
TexColor = color;
|
||||
TexCoord = aTextCoord;
|
||||
vec4 temp = (vec4(aPos.xyz,1.0) + vec4(color.yz-vec2(0.5,0.5),0.0,0.0)) * rotation;
|
||||
gl_Position = /**/ camera * /**/ temp;
|
||||
}
|
||||
|
||||
//struct
|
||||
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+127fcdbfd32fd1caa4a55ced77c7e738f038a59c")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e1e416bb41a7e16ddec5e7c16d64c72d6aa380e1")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
404eed79c64e05ccd057bd69d0503642dcf7340a381bfbf7fcd452b46996af31
|
||||
5fc65e27ab1eae6b9eeb60c61c388d2d98eeb396f53cbb6b719f6e99588e5cd4
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/127fcdbfd32fd1caa4a55ced77c7e738f038a59c/*"}}
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/e1e416bb41a7e16ddec5e7c16d64c72d6aa380e1/*"}}
|
||||
@@ -64,12 +64,12 @@
|
||||
Set all necessary metadata to current form instance
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.SetSize(StgSharp.Math.Vec2d)">
|
||||
<member name="M:StgSharp.Graphics.Form.SetSize(StgSharp.Math.vec2d)">
|
||||
<summary>
|
||||
Resize the current form
|
||||
</summary>
|
||||
<param name="size">
|
||||
A <see cref="T:StgSharp.Math.Vec2d"/> (width,height) representing the new size of current form
|
||||
A <see cref="T:StgSharp.Math.vec2d"/> (width,height) representing the new size of current form
|
||||
</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.SetSize(System.Int32,System.Int32)">
|
||||
@@ -79,15 +79,15 @@
|
||||
<param name="width">New width of the window</param>
|
||||
<param name="height">New height of the window</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.SetSizeLimit(StgSharp.Math.Vec2d,StgSharp.Math.Vec2d)">
|
||||
<member name="M:StgSharp.Graphics.Form.SetSizeLimit(StgSharp.Math.vec2d,StgSharp.Math.vec2d)">
|
||||
<summary>
|
||||
Set the size limit of current form
|
||||
</summary>
|
||||
<param name="minSize">
|
||||
Minimun size of current form. In form of a <see cref="T:StgSharp.Math.Vec2d"/> of (width,height)
|
||||
Minimun size of current form. In form of a <see cref="T:StgSharp.Math.vec2d"/> of (width,height)
|
||||
</param>
|
||||
<param name="maxSize">
|
||||
Maximum size of current form. In form of a <see cref="T:StgSharp.Math.Vec2d"/> of (width,height)
|
||||
Maximum size of current form. In form of a <see cref="T:StgSharp.Math.vec2d"/> of (width,height)
|
||||
</param>
|
||||
</member>
|
||||
<member name="M:StgSharp.Graphics.Form.SetSizeLimit(System.Int32,System.Int32,System.Int32,System.Int32)">
|
||||
@@ -412,7 +412,7 @@
|
||||
An IEEE-754 double precision floating-point value, clamped to the range [0,1].
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:StgSharp.Math.Vec2d">
|
||||
<member name="T:StgSharp.Math.vec2d">
|
||||
<summary>
|
||||
A two dimension vector defined by two elements.
|
||||
Vec2Ds in StgSharp are defaultly usaed as colum vector.
|
||||
|
||||
Binary file not shown.
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("RealDebug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e1e416bb41a7e16ddec5e7c16d64c72d6aa380e1")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
89486dc671b7ac4f5d315ed89aaca21b3f7af7896e6ac4f4e417616c97a6421c
|
||||
2f4c77bd1fc4272d4cf4b3aa0bb67811f058b4248c7ce85863503cb47703efd4
|
||||
|
||||
+2
@@ -1,4 +1,6 @@
|
||||
is_global = true
|
||||
build_property.CsWin32InputMetadataPaths = C:\Users\Nitlo\.nuget\packages\microsoft.windows.sdk.win32metadata\55.0.45-preview\Windows.Win32.winmd|C:\Users\Nitlo\.nuget\packages\microsoft.windows.wdk.win32metadata\0.9.9-experimental\Windows.Wdk.winmd
|
||||
build_property.CsWin32InputDocPaths = C:\Users\Nitlo\.nuget\packages\microsoft.windows.sdk.win32docs\0.1.42-alpha\apidocs.msgpack
|
||||
build_property.TargetFramework = net6.0
|
||||
build_property.TargetPlatformMinVersion =
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user