I started working on a simple game engine and I'm trying to implement some 3D objects.
I have the basics, a simple test shader, but for some reason, the texture always appears as black. I rewrote everything once already, the problem is still there. I don't know what I'm doing wrong, I'm very much a beginner when it comes to graphics and OpenGL.
The running project is Game. In GameEngine there is the Mesh code, Shader and Texture2D.
Here is my GitHub repository: ChronosEngine
Edit:
Code is now fixed.
I didn't actually read your Code, but usually the issue you describe is caused by a missing light source. Try to apply some light and it might work.
Related
I want to know if there is a easy way to have the skybox draw over a gameObject, kind of like if the block is transparent but it also hides everything behind it. I'm a bit new to Unity so I don't know how to script shaders but I am pretty good at shader graphs. Anyone have any solutions?
I wanted to make an Outline shader, but only achieved the following. Works perfectly exclusively on the sphere. And in Cuba, it hardly works at all. Who have to use the Shader Graph, please help!
I tried to recreate your shader, do you have the correct shader type?
the effect that you're creating there is going to put an emission on faces that are a certain angle. it does not work to create an outline shader in the shader editor. here is a youtube tutorial to create the type of effect that you're trying to achieve https://youtu.be/SMLbbi8oaO8
Old post, but I have found a very easy way to do a simple outline shader. This is in the newest version of Unity (Unity 2022.1.0b14.2951).
Here's the graph:
Here are the settings:
And here are the results:
It starts to show its negative qualities when two outlined objects intersect, however.
we have a project at university where we have to create fractals that are controllable by the user (with kinect). We are still in an early phase where we evaluate some ideas (though we already got some working prototypes). Our idea right now is to use a blackboard-image as background and draw the fractals on top of it. To make this look more natural we'd like to use some crayon effects on the lines we draw.
Our internet-research produced two main ideas to achieve this:
Paint an image of a photoshop-like brush for every moueposition of a line.
Use shaders on drawline-functions.
The first does work for an early test, but looks awful. I guess the latter would be the best approach, but the information in the internet seems to be lacking regarding this topic. At least I didn't find anything that really helped a lot. The Questions is:
Has anyone links or general tips on how to achieve this effect, or is it not possible in C#/WPF. Might there be an even better way? And how can I apply a created shader to drawline-method/brushes?
Thanks in advance and kind regards
Michael
EDIT
Nice tip from #Bradley Uffner ! (unfortunately he deleted his answer)
There is a tutorial here on how to achieve such effect :
http://alastaira.wordpress.com/2013/11/01/hand-drawn-shaders-and-creating-tonal-art-maps/
Another thing I've found recently which might interests you :
http://blogs.msdn.com/b/hemipteran/archive/2014/03/26/generating-noise-for-applications.aspx
I've didn't read well the title of your question, Windows Forms do not support shaders at all.
Be more specific about the meaning of a crayon shader
Regarding using shaders in WPF, you cannot apply them at a line-level but on a Control level instead.
This the class representing a shader in WPF:
http://msdn.microsoft.com/en-us/library/system.windows.media.effects.effect(v=vs.110).aspx
What I suggest
use an Image and set its Source property to use a WriteableBitmap
use the excellent WriteableBitmapEx library to easily draw on it, basically it's the WriteableBitmap in WPF but with many extension methods for drawing lines, circles, rectangles etc ...
then apply your shader to the Effect property of Image
For developing your shader
Use Shazzam, it allows you to develop an HLSL shader for WPF in a cool interface, preview it instantly and it will generate the Effect class ready to paste on your project.
There might be a couple of interesting shader for you in DOSBox SVN-Daum
Here's an example of the cartoon shader :
Obviously there will be quite some work as copy-pasting the shader to Shazzam won't work right away but you'll know what are the maths behind achieving the effect.
Mark the answer as accepted if you are satisfied with it :D if not edit your question and add more details.
I am working with XNA 3.0 (sigh, I know) and I am working off a tutorial that helps implement a 3d scene with objects where a spot light hits a torus and projects a hard-edged shadow. Now, I want to know where I can find help (tutorial, source code, snippet) to soften said shadow?
Simplest way would be use Percentage Closer Filtering. Basically it works by taking a few shadow map samples. You can start from an article in GPU Gems.
I am wondering if anyone can find a sample or has a sample or knows how to draw a 3D Model on the Zune HD.
It appears Microsoft limited the functionality of XNA for the Zune HD by removing the Model object. Is there a way they suggest replacing this object, or is there something else that can be done to draw Models?
Thanks.
It seems that there isn't really a way to do it at the moment, I know somebody has tried but it didn't work out very well.
The first link takes you to a discussion about why it's not available and the second takes you to the attempt at using 3d objects on the Zune.
Lack of 3d - Zune
3d Attempt
It seems like it's something that might not be available for a while, if at all.