Jump to content

xdaniel's Random Junk


xdaniel
 Share

Recommended Posts

On the left is a piece of paper, on the right are two buckets of paint, and the two buttons are big paint rollers! :D

 

...well, joking aside, it's kinda like a sort of "construction kit" for shaders written in GLSL (OpenGL Shading Language). GLSL is one of the two ways in which I emulate the N64's color combiner in SceneNavi, the other and more complete one being comparatively ancient (and/or unsupported?) fragment programs in the ARB assembly language.

 

The purpose of that construction kit thingy is to learn more about GLSL - by experimenting with the shader code live - and modern OpenGL usage in general. You can, for example, change the intensity of colors (sort of) by adding a multiplication to the "color = fragmentColor" equation in the fragment shader, as I've done in the screenshot above. You also do texturing, fog and a whole lot more - that is to say: pretty much everything - in GLSL. And that's where SceneNavi comes in again.

 

That SceneNavi screenshot I tweeted, with the fog and draw distance derived from Hyrule Field's environment settings... right now, I cannot do the fog together with the combiner emulation, because I'd need to change the ARB and GLSL combiners to manually calculate and apply the fog, which, while not impossible with the current code, would be annoying at the very least. So, after learning more about GLSL, how to write shaders that run on as much hardware out there as possible, etc., then I will rip out the existing combiner emulation code and rewrite it with just GLSL, so that it'll be more compatible, easier to work with and (hopefully) cleaner than the relative mess I have right now.

 

Link to comment
Share on other sites

I clearly don't get what this is. Explain it to me as if I am a stupid child :)

On the left is a piece of paper, on the right are two buckets of paint, and the two buttons are big paint rollers! :D

LOL!!

But I'm no different, I didn't know what it was ether :P 

  • Like 1
Link to comment
Share on other sites

Worked on the GLSL Tester some more..

 

...

  • Added FastColoredTextBox plus custom highlighting for, well, syntax highlighting
  • Slightly modified vertex shader & put both default shaders into external files; added reset buttons for each shader
  • Now has three different "models" to render: a triangle, a quad and a cube
  • Model can be set to auto-rotate on each of the three axis
  • Planning to add textures, loading and saving of shader files, and other shenanigans
2Tg2g3G.png

 

 

Link to comment
Share on other sites

You should add support for Geometry shaders as well, you may not have a need for it in the case of N64, but they're still a fun thing to tinker with :P

 

EDIT:

Well that's not entirely true, it would help with creating geometry using raw vertices, and I think it's also useful for morph target animations (though OoT uses Skeletal animations for the most part). One good resource I've found, and have been devouring lately, is the OpenGL Super Bible, you've probably already found it but here:

http://www.openglsuperbible.com/

Link to comment
Share on other sites

I skimmed through this article here and geometry shaders do sound quite interesting, yeah. Really should look into adding support for them.

 

And by the way, this program's evolving into unexpected directions...

 

 

...I guess I'll have to turn the various renderable objects into "scene nodes" as well now... and maybe even the shaders themselves?

 

XFx9vx9.png

 

Link to comment
Share on other sites

Yeah, I was a bit surprised myself actually. It looks, dare I say it, almost kinda professional, maybe?

 

Also been working on that texture map node some; texturing is starting to come together:

 

Nam9hE7.png

 

(...of course the texture coords are junk, etc., etc., but it's basically working.)

 

And on another note, once the basic program is done, I'm thinking of adding loaders for some model formats... or, well, for .obj at least, because I have a fairly good one already. Collada would be cool, but even though I added Collada exporting to that OoT3D viewer thingy with help from Peardian on Jul, parsing that format seems like a completely different story...

 

EDIT: Much better:

 

 

WT1aIfQ.png

 

And also, the texture used.

 

 

Edited by xdaniel
Textures cubed! Or GLSL'ed! Or something!
Link to comment
Share on other sites

Ended up using the "COLLADA document" part of this COLLADA for XNA for parsing. Still working on the rendering portion, tho... Basic rendering of geometry - no animation or materials or anything else fancy yet - is working more or less, although only for triangles; polylists I still need to implement.

 

Thus, here's a screenshot of something with triangles, and with bogus textures (because, no materials):

 

 

mpKZsFw.png

 

EDIT: Polylists and materials DONE(-ish):

 

akiwJm4.png

 

(...haa, Aero... <3 and </3 at the same time... fuck you, Capcom!)

 

Edited by xdaniel
  • Like 1
Link to comment
Share on other sites

Added automatic calculation of surface and vertex normals for Collada files, when none are contained within. Also used the program with its actual purpose in mind, for once: I tweaked this rudimentary celshading shader I found online, although not by much. It's not looking all that great, either, certainly nowhere near the greats with that kinda style - think Jet Set Radio, Wind Waker, etc... In fact, the original unlit rendering looks a whole lot better than this, so... meh. At least the normals themselves are fine! :P

 

 

HOsex3s.png

 

(And speaking of normals, if anyone wants a bit of a challenge, try fixing the OoT map/model converters and their lighting issues. Might not be too hard from what I re-read on the subject earlier, but then again, what do I know, having introduced those issues in the first place...)

 

EDIT: Mwahaha~! Some alright cel-shading and an alright outline! ...the latter isn't purely done in GLSL tho, so I probably shouldn't just leave it in the program.

 

 

Q2rScpV.png

 

Edited by xdaniel
Link to comment
Share on other sites

Fresh source code, fresh source code, get it while it's hot! (Although it probably sucks! :P)

 

https://github.com/xdanieldzd/Aglex - "Another OpenGL expansion & helper library", the thing that my OoT3D viewer also uses, which wasn't included with that program's source.

https://github.com/xdanieldzd/GLSLTester - "GLSL shader experimentation testbed & model viewer", the thing that my last few posts in here have been about.

 

Both of them might have some useful code, although there's not very many programmers here in the first place, let alone C# ones, right?

Link to comment
Share on other sites

Soul, yes someone has, it's been available since the beginning:

http://msdn.microsoft.com/en-us/library/ht8ecch6(v=vs.90).aspx

http://www.mono-project.com/AOT

 

And I'm going to have to disagree with you on that, C# is just barely better than Java in terms of syntax.

 

Thanks man, had no idea about that. I knew that you could target a specific architecture where it would generate native code stubs, but I had no idea you could compile the entire thing to native code.

 

On a side note, there are many ways in which C# is superior to Java. Type-safety, reflection, and delegation are some major areas. Plus there's the addition of custom attributes, interfaces, the use of destructors, pinvoking, and overall the runtime library is much richer. 

Link to comment
Share on other sites

Heh, it's just that the most recent progress doesn't show well in screenshots :P Such as loading and saving of the workspace - which I'll need to rewrite as serialization isn't working very well with the Collada parser I'm using -, refactoring and cleaning the code, things like that. It's not getting boring just yet.

 

Edit: Progress! Not in screenshot form, tho, just text - or XML to be exact:

 

 

 

<?xml version="1.0" encoding="UTF-8"?>
<Workspace>
  <VertexShader Guid="7cd93b06-f809-4970-9400-5ddf890dca80" ShaderType="VertexShader">23-76-65-72-73-69-6F-6E-20-33-33-30-20-63-6F-6D-70-61-74-69-62-69-6C-69-74-79-0D-0A-0D-0A-6C-61-79-6F-75-74-28-6C-6F-63-61-74-69-6F-6E-20-3D-20-30-29-20-69-6E-20-76-65-63-33-20-76-65-72-74-65-78-50-6F-73-69-74-69-6F-6E-3B-0D-0A-6C-61-79-6F-75-74-28-6C-6F-63-61-74-69-6F-6E-20-3D-20-31-29-20-69-6E-20-76-65-63-32-20-76-65-72-74-65-78-54-65-78-74-75-72-65-43-6F-6F-72-64-3B-0D-0A-6C-61-79-6F-75-74-28-6C-6F-63-61-74-69-6F-6E-20-3D-20-32-29-20-69-6E-20-76-65-63-34-20-76-65-72-74-65-78-43-6F-6C-6F-72-3B-0D-0A-6C-61-79-6F-75-74-28-6C-6F-63-61-74-69-6F-6E-20-3D-20-33-29-20-69-6E-20-76-65-63-33-20-76-65-72-74-65-78-4E-6F-72-6D-61-6C-3B-0D-0A-0D-0A-6F-75-74-20-76-65-63-34-20-66-72-61-67-6D-65-6E-74-43-6F-6C-6F-72-3B-0D-0A-6F-75-74-20-76-65-63-32-20-66-72-61-67-6D-65-6E-74-54-65-78-74-75-72-65-43-6F-6F-72-64-3B-0D-0A-0D-0A-76-61-72-79-69-6E-67-20-76-65-63-34-20-64-69-66-66-75-73-65-2C-20-61-6D-62-69-65-6E-74-3B-0D-0A-76-61-72-79-69-6E-67-20-76-65-63-33-20-6E-6F-72-6D-61-6C-2C-20-68-61-6C-66-56-65-63-74-6F-72-3B-0D-0A-0D-0A-75-6E-69-66-6F-72-6D-20-69-6E-74-20-70-61-73-73-4E-75-6D-62-65-72-3B-0D-0A-0D-0A-76-6F-69-64-20-6D-61-69-6E-28-76-6F-69-64-29-0D-0A-7B-0D-0A-20-20-20-20-6E-6F-72-6D-61-6C-20-3D-20-6E-6F-72-6D-61-6C-69-7A-65-28-67-6C-5F-4E-6F-72-6D-61-6C-4D-61-74-72-69-78-20-2A-20-76-65-72-74-65-78-4E-6F-72-6D-61-6C-29-3B-0D-0A-20-20-20-20-68-61-6C-66-56-65-63-74-6F-72-20-3D-20-67-6C-5F-4C-69-67-68-74-53-6F-75-72-63-65-5B-30-5D-2E-68-61-6C-66-56-65-63-74-6F-72-2E-78-79-7A-3B-0D-0A-0D-0A-20-20-20-20-64-69-66-66-75-73-65-20-3D-20-67-6C-5F-46-72-6F-6E-74-4D-61-74-65-72-69-61-6C-2E-64-69-66-66-75-73-65-20-2A-20-67-6C-5F-4C-69-67-68-74-53-6F-75-72-63-65-5B-30-5D-2E-64-69-66-66-75-73-65-3B-0D-0A-20-20-20-20-61-6D-62-69-65-6E-74-20-3D-20-67-6C-5F-46-72-6F-6E-74-4D-61-74-65-72-69-61-6C-2E-61-6D-62-69-65-6E-74-20-2A-20-67-6C-5F-4C-69-67-68-74-53-6F-75-72-63-65-5B-30-5D-2E-61-6D-62-69-65-6E-74-3B-0D-0A-20-20-20-20-61-6D-62-69-65-6E-74-20-2B-3D-20-67-6C-5F-4C-69-67-68-74-4D-6F-64-65-6C-2E-61-6D-62-69-65-6E-74-20-2A-20-67-6C-5F-46-72-6F-6E-74-4D-61-74-65-72-69-61-6C-2E-61-6D-62-69-65-6E-74-3B-0D-0A-0D-0A-20-20-20-20-69-66-20-28-70-61-73-73-4E-75-6D-62-65-72-20-3D-3D-20-30-29-0D-0A-20-20-20-20-7B-0D-0A-20-20-20-20-20-20-20-20-66-6C-6F-61-74-20-74-68-69-63-6B-6E-65-73-73-20-3D-20-28-28-67-6C-5F-4D-6F-64-65-6C-56-69-65-77-50-72-6F-6A-65-63-74-69-6F-6E-4D-61-74-72-69-78-20-2A-20-76-65-63-34-28-76-65-72-74-65-78-50-6F-73-69-74-69-6F-6E-2C-20-31-2E-30-29-29-20-2F-20-32-35-30-2E-30-29-2E-7A-3B-0D-0A-20-20-20-20-20-20-20-20-76-65-63-34-20-6F-66-66-73-65-74-50-6F-73-69-74-69-6F-6E-20-3D-20-76-65-63-34-28-76-65-72-74-65-78-50-6F-73-69-74-69-6F-6E-2E-78-79-7A-20-2B-20-28-76-65-72-74-65-78-4E-6F-72-6D-61-6C-20-2A-20-74-68-69-63-6B-6E-65-73-73-29-2C-20-31-2E-30-29-3B-0D-0A-20-20-20-20-20-20-20-20-67-6C-5F-50-6F-73-69-74-69-6F-6E-20-3D-20-67-6C-5F-4D-6F-64-65-6C-56-69-65-77-50-72-6F-6A-65-63-74-69-6F-6E-4D-61-74-72-69-78-20-2A-20-6F-66-66-73-65-74-50-6F-73-69-74-69-6F-6E-3B-0D-0A-20-20-20-20-7D-0D-0A-20-20-20-20-65-6C-73-65-20-69-66-20-28-70-61-73-73-4E-75-6D-62-65-72-20-3D-3D-20-31-29-0D-0A-20-20-20-20-7B-0D-0A-20-20-20-20-20-20-20-20-67-6C-5F-50-6F-73-69-74-69-6F-6E-20-3D-20-67-6C-5F-4D-6F-64-65-6C-56-69-65-77-50-72-6F-6A-65-63-74-69-6F-6E-4D-61-74-72-69-78-20-2A-20-76-65-63-34-28-76-65-72-74-65-78-50-6F-73-69-74-69-6F-6E-2C-20-31-2E-30-29-3B-0D-0A-20-20-20-20-7D-0D-0A-0D-0A-20-20-20-20-66-72-61-67-6D-65-6E-74-43-6F-6C-6F-72-20-3D-20-76-65-72-74-65-78-43-6F-6C-6F-72-3B-0D-0A-20-20-20-20-66-72-61-67-6D-65-6E-74-54-65-78-74-75-72-65-43-6F-6F-72-64-20-3D-20-76-65-72-74-65-78-54-65-78-74-75-72-65-43-6F-6F-72-64-3B-0D-0A-7D-0D-0A</VertexShader>
  <FragmentShader Guid="896b68fa-3b9a-41c9-9064-8df00690de9d" ShaderType="FragmentShader">23-76-65-72-73-69-6F-6E-20-33-33-30-20-63-6F-6D-70-61-74-69-62-69-6C-69-74-79-0D-0A-0D-0A-69-6E-20-76-65-63-34-20-66-72-61-67-6D-65-6E-74-43-6F-6C-6F-72-3B-0D-0A-69-6E-20-76-65-63-32-20-66-72-61-67-6D-65-6E-74-54-65-78-74-75-72-65-43-6F-6F-72-64-3B-0D-0A-0D-0A-6F-75-74-20-76-65-63-34-20-63-6F-6C-6F-72-3B-0D-0A-0D-0A-76-61-72-79-69-6E-67-20-76-65-63-34-20-64-69-66-66-75-73-65-2C-20-61-6D-62-69-65-6E-74-3B-0D-0A-76-61-72-79-69-6E-67-20-76-65-63-33-20-6E-6F-72-6D-61-6C-2C-20-68-61-6C-66-56-65-63-74-6F-72-3B-0D-0A-0D-0A-75-6E-69-66-6F-72-6D-20-73-61-6D-70-6C-65-72-32-44-20-74-65-78-74-75-72-65-4D-61-70-30-3B-0D-0A-75-6E-69-66-6F-72-6D-20-69-6E-74-20-70-61-73-73-4E-75-6D-62-65-72-3B-0D-0A-0D-0A-76-6F-69-64-20-6D-61-69-6E-28-76-6F-69-64-29-0D-0A-7B-0D-0A-20-20-20-20-76-65-63-34-20-74-65-78-74-75-72-65-43-6F-6C-6F-72-20-3D-20-74-65-78-74-75-72-65-28-74-65-78-74-75-72-65-4D-61-70-30-2C-20-66-72-61-67-6D-65-6E-74-54-65-78-74-75-72-65-43-6F-6F-72-64-29-3B-0D-0A-0D-0A-20-20-20-20-69-66-20-28-70-61-73-73-4E-75-6D-62-65-72-20-3D-3D-20-30-29-0D-0A-20-20-20-20-7B-0D-0A-20-20-20-20-20-20-20-20-63-6F-6C-6F-72-2E-72-67-62-20-3D-20-28-66-72-61-67-6D-65-6E-74-43-6F-6C-6F-72-2E-72-67-62-20-2A-20-74-65-78-74-75-72-65-43-6F-6C-6F-72-2E-72-67-62-29-20-2A-20-30-2E-32-35-3B-0D-0A-20-20-20-20-20-20-20-20-63-6F-6C-6F-72-2E-61-20-3D-20-31-2E-30-3B-0D-0A-20-20-20-20-7D-0D-0A-20-20-20-20-65-6C-73-65-20-69-66-20-28-70-61-73-73-4E-75-6D-62-65-72-20-3D-3D-20-31-29-0D-0A-20-20-20-20-7B-0D-0A-20-20-20-20-20-20-20-20-76-65-63-33-20-6E-20-3D-20-6E-6F-72-6D-61-6C-69-7A-65-28-6E-6F-72-6D-61-6C-29-3B-0D-0A-20-20-20-20-20-20-20-20-76-65-63-33-20-6C-69-67-68-74-44-69-72-20-3D-20-76-65-63-33-28-67-6C-5F-4C-69-67-68-74-53-6F-75-72-63-65-5B-30-5D-2E-70-6F-73-69-74-69-6F-6E-2E-78-79-7A-29-3B-0D-0A-0D-0A-20-20-20-20-20-20-20-20-66-6C-6F-61-74-20-4E-64-6F-74-4C-20-3D-20-6D-61-78-28-64-6F-74-28-6E-2C-20-6C-69-67-68-74-44-69-72-29-2C-20-30-2E-30-29-3B-0D-0A-20-20-20-20-20-20-20-20-76-65-63-34-20-74-6F-6F-6E-43-6F-6C-6F-72-20-3D-20-76-65-63-34-28-31-2E-30-2C-20-31-2E-30-2C-20-31-2E-30-2C-20-31-2E-30-29-3B-0D-0A-20-20-20-20-20-20-20-20-69-66-20-28-4E-64-6F-74-4C-20-3C-20-30-2E-35-29-20-74-6F-6F-6E-43-6F-6C-6F-72-2E-78-79-7A-20-3D-20-30-2E-37-35-3B-0D-0A-0D-0A-20-20-20-20-20-20-20-20-63-6F-6C-6F-72-20-3D-20-74-6F-6F-6E-43-6F-6C-6F-72-20-2A-20-28-66-72-61-67-6D-65-6E-74-43-6F-6C-6F-72-20-2A-20-74-65-78-74-75-72-65-43-6F-6C-6F-72-29-3B-0D-0A-20-20-20-20-7D-0D-0A-7D-0D-0A</FragmentShader>
  <Object Guid="e16b52a7-002c-412e-bd11-b68e67ee0a19" NodeName="objectName0" Number="0" RenderableObject="GLSLTester.Objects.ColladaDae" RotationX="0" RotationY="365,489366666668" RotationZ="0" AutoRotateX="False" AutoRotateY="True" AutoRotateZ="False" ObjectPath="E:\Dokumente und Einstellungen\Daniel\Eigene Dateien\aero_model\aero_test.dae" />
</Workspace>
...or, well, actually, here's a screenshot of what happens when I load that XML file into the program:

 

kgIBbY4.png

 

(Duh?)

 

 

Link to comment
Share on other sites

@xdan  looking badass  :3  I missed a few pages btw in my absense, is this Collada parser for that Dreamcast game you were working on?
 
 
 

OFF TOPIC:

 

Awwww and I was looking forward to bashing Java lol

 
It was more a less about bashing me. He misinterpreted what I had said and since he has some sort of beef with me for reasons I can't recall, he wanted to start an argument.

Link to comment
Share on other sites

SoD: This is a whole separate project, or well, it mostly is. It's related to SceneNavi in that it's some sort of GLSL experimentation/testing grounds, which I'll be using / already am using to try and improve my GLSL skills, so that I'll eventually be able to code some cleaner combiner emulation for SceneNavi. I know there's other, similar and more advanced tools for ex. editing shader code and seeing the results immediately, but I think this is good practice regardless.

 

The Dreamcast project is kinda on hold right now, one reason being that the initial idea - a port of sorts of the first Etrian Odyssey from DS - has been proven a bit more troublesome than expected, mainly regarding performance... I can't render enough of EO1's original floor tile models to keep a good draw distance without ruining the FPS. Plus, I've repeatedly been running into memory limitations with the PVR GPU - I already had downscaled the textures, but now it's the number of vertices/polygons I'm having problems with. So, while I want to keep the basic gameplay from EO (dungeon crawler RPG, etc.), I'll eventually make my own, less detailed models.

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.