Skip to content

Commit 3e60290

Browse files
committed
FrameBuffer Upgrade and finished up tangent stuff.
1 parent 9c46a94 commit 3e60290

38 files changed

Lines changed: 2686 additions & 267 deletions

imgui.ini

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[Window][Debug##Default]
2-
Pos=60,60
2+
Pos=60,27
33
Size=400,400
44
Collapsed=0
55

@@ -14,7 +14,7 @@ Size=271,167
1414
Collapsed=0
1515

1616
[Window][Fog]
17-
Pos=773,493
17+
Pos=238,322
1818
Size=286,135
1919
Collapsed=0
2020

@@ -28,6 +28,26 @@ Pos=996,606
2828
Size=800,600
2929
Collapsed=0
3030

31+
[Window][Framebuffer Demo]
32+
Pos=297,204
33+
Size=632,296
34+
Collapsed=0
35+
36+
[Window][Framebuffer MRT Demo]
37+
Pos=492,192
38+
Size=254,219
39+
Collapsed=0
40+
41+
[Window][Framebuffer Depth Demo]
42+
Pos=60,60
43+
Size=521,202
44+
Collapsed=0
45+
46+
[Window][Framebuffer Final Demo]
47+
Pos=157,27
48+
Size=507,242
49+
Collapsed=0
50+
3151
[Table][0x24931313,4]
3252
RefScale=13
3353
Column 0 Sort=0^

src/library/java/gg/generations/rarecandy/renderer/loading/ModelLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public static void processModel(
8080

8181
int drawBytes = meshes.length * Integer.BYTES * 2;
8282

83-
int vertexBytes = vertexCount * 80;
83+
int vertexBytes = vertexCount * 96;
8484

8585
int materialBytes = objects.materials.length * 192;
8686
int variantBytes = objects.variants.length * Variant.SIZE;

src/library/java/gg/generations/rarecandy/renderer/model/MeshDrawCommand.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/library/java/gg/generations/rarecandy/renderer/pipeline/util/Uniform.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public void uploadImage2D(ITexture texture, int unit) {
137137
}
138138

139139
public void uploadImage2D(ITexture texture, int unit, int layer) {
140-
uploadImage2D(texture.getId(), texture.getType(), texture.access(), unit, layer);
140+
uploadImage2D(texture.id(), texture.type(), texture.access(), unit, layer);
141141
}
142142

143143
public void uploadImage2D(TextureArray texture, ITexture.ComputeAccess access, int unit, int layer) {

src/library/java/gg/generations/rarecandy/renderer/rendering/ObjectInstance.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public ObjectInstance(Matrix4f transformationMatrix, Matrix3f normalMatrix, int
2828

2929
public void update(SSBOBuffer instanceBuffer) {
3030
instanceBuffer.put(transformationMatrix);
31+
instanceBuffer.put(normalMatrix);
3132
}
3233

3334
public void link(MultiRenderObject object) {

src/library/java/gg/generations/rarecandy/renderer/storage/AnimatedObjectInstance.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import java.util.Arrays;
1212

1313
public class AnimatedObjectInstance extends ObjectInstance {
14-
public static final int ANIMATED_SIZE = MAT4_SIZE * 221;
14+
public static final int ANIMATED_SIZE = MAT4_SIZE * 222;
1515

1616
@Nullable
1717
public AnimationInstance currentAnimation;

src/library/java/gg/generations/rarecandy/renderer/storage/SSBOBuffer.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@ public SSBOBuffer put(Matrix2f transformationMatrix) {
6868
return this;
6969
}
7070

71-
public SSBOBuffer put(Matrix3f transformationMatrix) {
72-
transformationMatrix.getToAddress(pos);
73-
pos += 36;
71+
public SSBOBuffer put(Matrix3f matrix) {
72+
put(matrix.m00()).put(matrix.m01()).put(matrix.m02()).put(0.0f);
73+
put(matrix.m10()).put(matrix.m11()).put(matrix.m12()).put(0.0f);
74+
put(matrix.m20()).put(matrix.m21()).put(matrix.m22()).put(0.0f);
7475
return this;
7576
}
7677
public SSBOBuffer put(Matrix4f transformationMatrix) {

src/library/java/gg/generations/rarecandy/renderer/textures/BlankTexture.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,12 @@ public BlankTexture(Texture.Type type, int width, int height, ComputeAccess acce
4040
}
4141

4242
@Override
43-
public int getId() {
43+
public int id() {
4444
return id;
4545
}
4646

4747
@Override
48-
public Type getType() {
49-
return type;
50-
}
51-
52-
public Texture.Type type() {
48+
public Type type() {
5349
return type;
5450
}
5551

src/library/java/gg/generations/rarecandy/renderer/textures/DDSTextureDetails.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public int height() {
3939

4040
@Override
4141
public ITexture.Type type() {
42-
return ITexture.Type.RGBA_BYTE; //TODO: Not use an naiave assumption.
42+
return ITexture.Type.RGBA8; //TODO: Not use an naiave assumption.
4343
}
4444

4545
@Override

0 commit comments

Comments
 (0)