Skip to main content

Shaders

1 reply [Last post]
Anonymous

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Chris Campbell

I suggest you check out:
https://scenegraph-effects.dev.java.net

This is where we develop the Scenario effects framework, which is
basically the implementation of the javafx.gui.effect package.

Most of the Effects in that package (GaussianBlur, ColorAdjust,
PhongLighting, etc, etc) are implemented using a custom language (called
JSL for lack of a better name), and a special compiler that
translates/compiles JSL files into the equivalent GLSL (for OpenGL),
HLSL (for Direct3D), and pure Java code (for when the hardware pipelines
aren't available).

In an ideal world, we would make it possible for any developer, yourself
included, to write their own effects using JSL, but doing so would
require more resources than we can spare at the moment. So for now, JSL
(the language) and JSLC (the compiler) exist as a really nice way for us
to implement the core Effects, as it eliminates the tedious task of
hand-writing shader code for each of the target languages.

If you're willing to ignore all the rough edges (meaning we're unlikely
to provide much help/support if you do decide to play with it), you can
check out the Decora-Demo project in the scenegraph-effects repository,
where there are a couple examples of "user-generated" (non-core) Effects
that are implemented using JSL.

For more on this subject, read my blog from a couple months back:
http://weblogs.java.net/blog/campbell/archive/2008/02/effectuation_th.html

Chris

Goddard Jiri wrote:
> That's perfect, I knew yo uwork with shaders there:) I'm asking if it
> makes a sense to have shaders API in SceneGraph and JavaFX. For example
> if I'll want to create my own filter or so, it would be nice if I could
> use a shader that can accelerate it. Does that make a sense?
>
> Jiri
>
> On Fri, Apr 18, 2008 at 3:41 AM, Chris Campbell
> > wrote:
>
> The implementations of Java2D and Scenario (specifically, the effect
> package) already take advantage of pixel shaders whenever possible
> to accelerate various operations.
>
> Is this what you're asking about? Or are you asking for some sort
> of new API that allows you to write shaders from JavaFX Script? Or
> something else?
>
> Chris
>
>
>
> Goddard Jiri wrote:
>
> Hi,
>
> this may be unnecessary, but I'd like to ask you if we could
> benefit from using 2D shaders in our JFX/SG programs? I know
> that you and SceneGraph team are working hard on HW acceleration
> of graphics and it seems to be convenient to have CGSL and GLSL
> APIs in both projects in case that it's not already implemented
> at lower levels.
>
> Thanks for reply, Jiri
> --
> web: http://dredwerkz.ic.cz
> icq: 218 659 431
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@openjfx-compiler.dev.java.net
>
> For additional commands, e-mail:
> dev-help@openjfx-compiler.dev.java.net
>
>
>
>
>
> --
> web: http://dredwerkz.ic.cz
> icq: 218 659 431

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@scenegraph.dev.java.net
For additional commands, e-mail: dev-help@scenegraph.dev.java.net