Merge branch 'main' of https://github.com/andrewjhaman/rpgpt
commit
a472e52f27
@ -1,79 +0,0 @@
|
|||||||
@module armature
|
|
||||||
|
|
||||||
@vs vs
|
|
||||||
in vec3 pos_in;
|
|
||||||
in vec2 uv_in;
|
|
||||||
in vec4 indices_in; // is a sokol SG_VERTEXFORMAT_USHORT4N, a 16 bit unsigned integer treated as a floating point number due to webgl compatibility
|
|
||||||
in vec4 weights_in;
|
|
||||||
|
|
||||||
out vec3 pos;
|
|
||||||
out vec2 uv;
|
|
||||||
|
|
||||||
uniform vs_params {
|
|
||||||
mat4 model;
|
|
||||||
mat4 view;
|
|
||||||
mat4 projection;
|
|
||||||
vec2 bones_tex_size;
|
|
||||||
};
|
|
||||||
uniform sampler2D bones_tex;
|
|
||||||
|
|
||||||
float decode_normalized_float32(vec4 v)
|
|
||||||
{
|
|
||||||
float sign = 2.0 * v.x - 1.0;
|
|
||||||
|
|
||||||
return sign * (v.z*255.0 + v.y);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
vec4 total_position = vec4(0.0f);
|
|
||||||
|
|
||||||
for(int bone_influence_index = 0; bone_influence_index < 4; bone_influence_index++)
|
|
||||||
{
|
|
||||||
float index_float = indices_in[bone_influence_index];
|
|
||||||
int index = int(index_float * 65535.0);
|
|
||||||
float weight = weights_in[bone_influence_index];
|
|
||||||
|
|
||||||
float y_coord = (0.5 + index)/bones_tex_size.y;
|
|
||||||
|
|
||||||
mat4 bone_mat;
|
|
||||||
|
|
||||||
for(int row = 0; row < 4; row++)
|
|
||||||
{
|
|
||||||
for(int col = 0; col < 4; col++)
|
|
||||||
{
|
|
||||||
bone_mat[col][row] = decode_normalized_float32(texture(bones_tex, vec2((0.5 + col*4 + row)/bones_tex_size.x, y_coord)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 local_position = bone_mat * vec4(pos_in, 1.0f);
|
|
||||||
total_position += local_position * weight;
|
|
||||||
}
|
|
||||||
|
|
||||||
gl_Position = projection * view * model * total_position;
|
|
||||||
//gl_Position = projection * view * model * vec4(pos_in, 1.0);
|
|
||||||
|
|
||||||
pos = gl_Position.xyz;
|
|
||||||
uv = uv_in;
|
|
||||||
}
|
|
||||||
@end
|
|
||||||
|
|
||||||
@fs fs
|
|
||||||
uniform sampler2D tex;
|
|
||||||
in vec3 pos;
|
|
||||||
in vec2 uv;
|
|
||||||
out vec4 frag_color;
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
vec4 col = texture(tex, uv);
|
|
||||||
if(col.a < 0.5)
|
|
||||||
{
|
|
||||||
discard;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
frag_color = vec4(col.rgb, 1.0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@end
|
|
||||||
|
|
||||||
@program program vs fs
|
|
Binary file not shown.
@ -1,68 +1,2 @@
|
|||||||
[
|
[
|
||||||
{can_hear: [NPC_Jester, NPC_Bill]},
|
|
||||||
{enum: NPC_Jester , dialog: "Hehehe! Quit quant, a peasant from the mortal realm!", to: Bill},
|
|
||||||
{enum: NPC_Bill , mood: Scared, dialog: "No...Please! Stay away from me! Who the Hell are you!", thoughts: "I'm kind of mad, and this Jester guy is kind of an asshole", to: Jester},
|
|
||||||
{enum: NPC_Jester , dialog: "Poor Bill, I'm sure your ex-wife says the same...", to: Bill},
|
|
||||||
{enum: NPC_Bill , mood: Angry, dialog: "You evil BASTARD!! What is this place???", thoughts: "I hate the Jester because he dissed my ex-wife. And, he's being all vague and condescending. I would punch him if I could", to: Jester},
|
|
||||||
{enum: NPC_Jester , dialog: "I'll leave that for you to find out ;)", action: ACT_causes_testicular_torsion, to: Bill},
|
|
||||||
{enum: NPC_Bill , mood: Agony, dialog: "AUGGHGHHH!!! THE PAIN IS UNBEARABLE", thoughts: "SCREW THIS JESTER GUY HE FUCKED WITH MY NUTS", to: Jester},
|
|
||||||
{enum: NPC_Jester , dialog: "That's just a taste of what's to come! Bye bye~", action: ACT_undoes_testicular_torsion, to: Bill},
|
|
||||||
{can_hear: [NPC_Jester, NPC_TheBlacksmith]},
|
|
||||||
{enum: NPC_Jester , dialog: "A fine strong man you are, mister meld!", to: TheBlacksmith},
|
|
||||||
{enum: NPC_TheBlacksmith, mood: Confused, dialog: "I'll take any complement I can get, but you suddenly knowing my name is pretty weird dude.", thoughts: "This Jester looking guy gives me the creeps...", to: Jester},
|
|
||||||
{enum: NPC_Jester , dialog: "A strong man needs strong metal...Some magic magnetic fish could do the trick! They'd pick up all the river iron", to: TheBlacksmith },
|
|
||||||
{enum: NPC_TheBlacksmith, mood: Curious, dialog: "You know what I'll bite, where do I get this fish.", thoughts: "I can't believe business is so poor that I'm stopping to this...", to: Jester},
|
|
||||||
{enum: NPC_Jester , dialog: "Come now, follow me...", to: TheBlacksmith},
|
|
||||||
{can_hear: [NPC_Jester, NPC_TheBlacksmith, NPC_Edeline]},
|
|
||||||
{enum: NPC_Jester , dialog: "Edeline, fine enchantress. This blacksmith has asked for your hand in marriage if you would enchant these fish for him", to: Edeline},
|
|
||||||
{enum: NPC_TheBlacksmith, mood: Anxious, dialog: "Y-yes...", thoughts: "THAT BASTARD! It'd be too awkward to back out now...", to: Edeline},
|
|
||||||
{enum: NPC_Edeline , mood: Happy, dialog: "Oh my gosh! I leap with joy! I see much joy in our future, Meld.", thoughts: "I really hope he doesn't back out, I'm tired of being the crazy town spinster!", to: Meld},
|
|
||||||
{enum: NPC_Jester , dialog: "The fish!", to: Edeline},
|
|
||||||
{enum: NPC_Edeline , mood: Curious, dialog: "AH! Of course, here you are then!", thoughts: "I have no idea what these magnetic fish would be good for...", action: "ACT_enchant_fish", to: Meld},
|
|
||||||
{enum: NPC_TheBlacksmith, mood: Happy, dialog: "Finally, maybe this will help me replenish my metal reserves", thoughts: "I have no idea where all my metal went. I wonder if somebody stole it", to: Edeline},
|
|
||||||
{can_hear: [NPC_Jester, NPC_Blue]},
|
|
||||||
{enum: NPC_Blue , mood: Angry, dialog: "What the-my rod! These fish broke my fishing rod! Why are they glowing???", thoughts: "I'll be destroyed in the free market if I don't figure this out!"},
|
|
||||||
{enum: NPC_Jester , dialog: "Ho-ho! You know, if you want your rod to get done in split, Meld's anvil's got plenty reserves...", to: Blue},
|
|
||||||
{enum: NPC_Blue , mood: Excited, dialog: "Are you saying I should steal, betray the trust of Meld, just so my company makes more money? Sold!", thoughts: "Meld's fault for not hiring private security!", to: Jester},
|
|
||||||
{can_hear: [NPC_Jester, NPC_Blue, NPC_TheBlacksmith]},
|
|
||||||
{enum: NPC_Blue , mood: Excited, dialog: "Hey meld, what's that shiny thing over there?", thoughts: "Time to steal me an iron pole for my iron ROD!", to: Meld},
|
|
||||||
{enum: NPC_TheBlacksmith, mood: Curious, dialog: "Hm?", thoughts: "What is it now....", to: Blue},
|
|
||||||
{can_hear: [NPC_Jester, NPC_Blue]},
|
|
||||||
{enum: NPC_Blue , mood: Happy, dialog: "Hehehe...", thoughts: "EASY!", action: "ACT_steal_iron_pole"},
|
|
||||||
{can_hear: [NPC_Jester, NPC_Blue, NPC_TheBlacksmith]},
|
|
||||||
{enum: NPC_TheBlacksmith, mood: Confused, dialog: "There wasn't anything over there?", thoughts: "What does this guy think he's doing?", to: Blue},
|
|
||||||
{enum: NPC_Blue , mood: Elated, dialog: "Don't worry about it man! You have a good one", thoughts: "PEACE OF CAKE!", to: TheBlacksmith},
|
|
||||||
{can_hear: [NPC_Jester, NPC_Davis]},
|
|
||||||
{enum: NPC_Jester , dialog: "You know Davis, I can promise you fortune and power beyond your comprehension if you assist me in my antics. I mean to bring devastation to this town", to: Davis},
|
|
||||||
{enum: NPC_Davis , mood: Sad, dialog: "...", speech: "This jester guy reminds me of when I was younger.", to: Jester},
|
|
||||||
{enum: NPC_Jester , dialog: "Cat got your tongue?", to: Davis},
|
|
||||||
{enum: NPC_Davis , mood: Angry, dialog: "You need friends so badly, mister jester, that you resort to disgusting party tricks and trivial annoyance? I will not allow this.", thoughts: "He can stare me down all he wants, all he'll find is a blank mirror.", to: Jester},
|
|
||||||
{enum: NPC_Jester , dialog: "Careful there, diogenes! I've got more knives than you fingers!", to: Davis},
|
|
||||||
{enum: NPC_Davis , mood: Indifferent, dialog: "Petty violence means nothing to me. Can't you see where you end? At nothing, where you began.", thoughts: "I am empty of everything.", to: Jester},
|
|
||||||
{enum: NPC_Jester , dialog: "Have it your way! I'll be in touch...", to: Davis},
|
|
||||||
{enum: NPC_Davis , mood: Confident, dialog: "If you bring me death, I welcome it. If you bring me victory, I am unperturbed. If you return, I will have your head, no matter the cost.", thoughts: "It really is a nice day out today.", to: Jester},
|
|
||||||
|
|
||||||
{can_hear: [NPC_Jester, NPC_Red]},
|
|
||||||
{enum: NPC_Jester , dialog: "Red, everybody in this town is a capitalist, and you must overthrow them!", to: Red},
|
|
||||||
{enum: NPC_Red , mood: Enraged, dialog: "What?? This is an OUTRAGE!", thoughts: "CAPITALIST PIGS!", to: Jester},
|
|
||||||
|
|
||||||
{can_hear: [NPC_Jester, NPC_TheKing]},
|
|
||||||
{enum: NPC_Jester , dialog: "Silly king, you think you have power? Your townsfolk are sure to revolt...", to: TheKing},
|
|
||||||
{enum: NPC_TheKing , mood: Scared, dialog: "This is unacceptable...you must tell me more.", thoughts: "If this jester lies I will destroy him.", to: Jester},
|
|
||||||
{enum: NPC_Jester , dialog: "Blue and Red are spouting free-will propaganda, tarnishing your position. Meld is disgusted by what your tarriffs impose on him, and Esmerelda fortells of doom and chaos to fall upon your kingdom.", to: TheKing},
|
|
||||||
{enum: NPC_TheKing , mood: Confident, dialog: "This is dire indeed...I will have to think on this. Thank you, Jester, for the warning.", thoughts: "I must remain calm and collected, even in the sightlines of such terrible danger to my kingdom.", to: Jester},
|
|
||||||
|
|
||||||
{can_hear: [NPC_Jester, NPC_Door]},
|
|
||||||
{enum: NPC_Jester , dialog: "Open, sesame!", to: Door},
|
|
||||||
{enum: NPC_Door , mood: Indifferent, dialog: "DENIED. SAY THE WORDS", to: Jester, thoughts: "I MUST PROTECT."},
|
|
||||||
{enum: NPC_Jester , dialog: "What words?", to: Door},
|
|
||||||
{enum: NPC_Door , mood: Indifferent, dialog: "UKNOWN. DATA PRIVATE", to: Jester, thoughts: "I MUST NEVER UTTER THE WORDS."},
|
|
||||||
{enum: NPC_Jester , dialog: "Cmon... don't want to spit it out?", to: Door},
|
|
||||||
{enum: NPC_Door , mood: Angry, dialog: "EVIL PRESENCE. DEFILE INNARDS, YOU WILL. DENIED. SAY THE WORDS", to: Jester, thoughts: "HE MUST NOT KNOW"},
|
|
||||||
{enum: NPC_Jester , dialog: "Ah! I've found all your secrets! The words are folly and temperance", to: Door},
|
|
||||||
{enum: NPC_Door , mood: Angry, dialog: "DENIED. ALL THREE ARE REQUIRED.", to: Jester, thoughts: "HE MUST HAVE ALL THREE"},
|
|
||||||
|
|
||||||
{can_hear: [NPC_Jester, NPC_Pile]},
|
|
||||||
{enum: NPC_Jester , dialog: "Now, for the almighty sword...", to: Pile},
|
|
||||||
{enum: NPC_Pile , dialog: "Your attempts are futile. I give the sword only to the great and honorable." to: Jester, thoughts: "I must retain the sword for the hero", mood: Confident}
|
|
||||||
]
|
]
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
Cameron Reikes
|
||||||
|
everything else
|
||||||
|
|
||||||
|
Greg
|
||||||
|
all the art and UI design
|
||||||
|
|
||||||
|
Andrew
|
||||||
|
shadow mapping and rendering
|
||||||
|
fixing collision algorithms
|
||||||
|
|
||||||
|
Phillip Trudeau
|
||||||
|
advice
|
||||||
|
|
||||||
|
evolve_audio on fiverr
|
||||||
|
awesome trailer music
|
@ -1,54 +0,0 @@
|
|||||||
@module shadow_mapper
|
|
||||||
|
|
||||||
|
|
||||||
@vs vs
|
|
||||||
in vec3 pos_in;
|
|
||||||
in vec2 uv_in;
|
|
||||||
|
|
||||||
out vec3 pos;
|
|
||||||
out vec2 uv;
|
|
||||||
|
|
||||||
|
|
||||||
uniform vs_params {
|
|
||||||
mat4 model;
|
|
||||||
mat4 view;
|
|
||||||
mat4 projection;
|
|
||||||
};
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
pos = pos_in;
|
|
||||||
uv = uv_in;
|
|
||||||
gl_Position = projection * view * model * vec4(pos_in, 1.0);
|
|
||||||
}
|
|
||||||
@end
|
|
||||||
|
|
||||||
@fs fs
|
|
||||||
|
|
||||||
vec4 encodeDepth(float v) {
|
|
||||||
vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * v;
|
|
||||||
enc = fract(enc);
|
|
||||||
enc -= enc.yzww * vec4(1.0/255.0,1.0/255.0,1.0/255.0,0.0);
|
|
||||||
return enc;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
uniform sampler2D tex;
|
|
||||||
|
|
||||||
in vec3 pos;
|
|
||||||
in vec2 uv;
|
|
||||||
|
|
||||||
out vec4 frag_color;
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
vec4 col = texture(tex, uv);
|
|
||||||
if(col.a < 0.5)
|
|
||||||
{
|
|
||||||
discard;
|
|
||||||
}
|
|
||||||
|
|
||||||
float depth = gl_FragCoord.z;
|
|
||||||
frag_color = encodeDepth(depth);
|
|
||||||
}
|
|
||||||
@end
|
|
||||||
|
|
||||||
@program program vs fs
|
|
Binary file not shown.
Loading…
Reference in New Issue