Commit Graph
2147 Commits
Author SHA1 Message Date
Branimir Karadžić 9f7386e53a Rebuilt NanoVG embedded shader. 2016-08-10 10:59:07 -07:00
Branimir Karadžić d7026e8f0c Reverted embedded shader. 2016-08-09 22:54:18 -07:00
Olli Wang b9810aca70 Updates nanovg backend to adopt premultiplied alpha. (#873)
This commit updates nanovg's bgfx backend to adopt premultiplied alpha as the default blending mode just like the original nanovg. Both the fragment shader and the `glnvg__convertPaint()` function are updated to match the original nanovg counterpart.

However, the binary file of the fragment shader is built on Mac so DirectX support is missing.
2016-08-09 22:44:04 -07:00
Branimir Karadžić dd0d563417 Fixed build. 2016-08-08 16:33:17 -07:00
Branimir Karadžić b4cb6a352e Fixed clang4 error. 2016-08-08 13:17:07 -07:00
Branimir Karadžić c25a273e29 Cleanup. 2016-08-08 09:23:42 -07:00
Olli Wang f11d954bc1 Implements nanovg's framebuffer helper functions. (#869)
This commit ports nanovg's helper functions for rendering stuff in framebuffer defined in `nanovg_gl_utils.h`. Also, a new `nvgState()` function is created for bgfx backend so it is possible to blend between framebuffers, which feature is long requested but not yet supported in original nanovg. The `nvgState()` function can be called between `nvgBeginFrame()` and `nvgEndFrame()`.
2016-08-08 08:33:37 -07:00
Olli Wang fa73aa4b09 Adds iOS device's Retina screen support for nanovg. (#865)
This commit fixes the bug that the bgfx does not respect the `devicePixelRatio` parameter passed to nanovg's `nvgBeginFrame()` function. The problem is caused by the `bgfx::setViewRect()` call defined in the `nvgRenderViewport()` function, as it should take size in consideration of the `devicePixelRatio` value.

However, this commit does not fix nanovg's example app because currently there is no easy way to pass the scale value to the `ExampleNanoVG::update()` method as it calls `nvgBeginFrame()`.
2016-08-05 09:50:02 -07:00
Olli Wang c960c46564 Moves additional bgfx nanovg functions to a separate header file.
This commit moves the additional nanovg functions for bgfx to a separate header file, so it is possible to compile the original nanovg  source files with bgfx in a custom build environment.
2016-08-05 17:26:06 +08:00
Branimir Karadžić 4fbf1c0ca2 Cleanup. 2016-07-25 19:09:52 -07:00
Branimir Karadžić 4744a44880 Cleanup. 2016-07-24 19:49:27 -07:00
Branimir Karadžić 972a8c029e Cleanup. 2016-07-24 17:17:12 -07:00
Branimir Karadžić 11e66f2383 Cleanup. 2016-07-24 16:45:34 -07:00
Branimir Karadžić 6c767eed9c Cleanup. 2016-07-24 16:18:26 -07:00
Branimir Karadžić 6cd0d95adb Renamed example to shorter name. 2016-07-24 16:08:59 -07:00
Branimir Karadžić 09e791be03 Rebuilt shaders. 2016-07-24 16:07:09 -07:00
Branimir Karadžić 5b3c9609cb Cleanup. 2016-07-24 15:50:42 -07:00
jcherlin f56cf4c88e Added RSM sample. (#854)
* Added RSM sample.
2016-07-24 15:39:50 -07:00
Branimir Karadžić ce878f9180 Renaming float4_t to simd128_t. 2016-07-18 19:03:25 -07:00
Branimir Karadžić 894e2d77b6 Rebuilt shaders. 2016-07-16 08:25:02 -07:00
cancel e34fdb4893 Fix issues with example 18-ibl's shaders.
Change vs_ibl_skybox.sc to correctly use radians instead of degrees when
specifying field-of-view. Additionally, use u_viewRect to find the correct
aspect ratio of the viewport, instead of hard-coding to 4/3.

Change fs_ibl_skybox.sc, fixing a number of small issues and mistakes. These
mistakes would lead to incorrect lighting results, especially with metallic
materials at glancing angles.

This commit does not include the rebuilt .bin output of shaderc for these
shaders.
2016-07-16 17:05:15 +09:00
Branimir Karadžić c97f6c41c4 Cleanup. 2016-07-10 23:41:56 -07:00
Branimir Karadžić 37e233578a Cleanup. 2016-07-10 20:20:50 -07:00
Branimir Karadžić 0144de56bf Cleanup. 2016-07-10 11:32:20 -07:00
Branimir Karadžić 860c20686e Cleanup. 2016-07-10 11:10:44 -07:00
Branimir Karadžić 37e2d8bb67 Fixed build error. 2016-07-10 00:10:57 -07:00
Branimir Karadžić 6c238615ec Added missing screenshot. 2016-07-10 00:04:09 -07:00
Branimir Karadžić ce0f05bf57 Cleanup. 2016-07-09 23:42:03 -07:00
Branimir Karadžić a8ffb3650f Added binary shaders for 30-picking example. 2016-07-09 23:41:52 -07:00
jcherlin f04755f9a3 Mouse Picking Example (#846)
* Added mouse picking example.
2016-07-09 23:41:38 -07:00
Jean-François Verdon 3bdeea1f4b Android mouse event injection is overcomplicated, and furthemore, bugged: it sends a mouse up event before a mouse down, and have other issues like the fact that he work with one event latter. Simplifying it and correcting it. 2016-07-04 01:55:20 +02:00
Jean-François Verdon a9a7cbb86c Mouse clicks should update mouse position too 2016-07-04 01:42:44 +02:00
Branimir Karadžić 4b26830fc1 shaderc: Allow shader without color target write. 2016-07-01 20:38:12 -07:00
Lunkhound c066ca0d62 Fix out-of-bounds array access (was asserting in example-10-font, debug build) 2016-07-01 18:03:39 -07:00
attilaz 317bcb0ea9 metal fixes (#827) 2016-06-28 09:06:21 -07:00
Branimir Karadžić 916a64e83c Updated shaders. 2016-06-27 23:26:43 -07:00
Dario c9a84bd542 18-ibl fixes. (#824)
* Fixing issue #817.

* Fixing env matrix for IBL.
2016-06-27 08:54:29 -07:00
Branimir Karadžić d2c6c79551 debugdraw: Added solid fill alpha blend. 2016-06-24 20:39:58 -07:00
Branimir Karadžić 9c84ef8cf7 Fixed issue #815. 2016-06-22 19:53:04 -07:00
Branimir Karadžić 2ca46b06f8 Cleanup. 2016-06-19 22:00:24 -07:00
Branimir Karadžić 4a6afd04b5 debugdraw: Added axis thickness. 2016-06-15 20:28:54 -07:00
Branimir Karadžić c8b27d93db Cleanup. 2016-06-15 17:34:59 -07:00
Branimir Karadžić 87c7206900 Cleanup. 2016-06-15 12:58:36 -07:00
Branimir Karadžić e50bda7818 Cleanup. 2016-06-15 09:33:11 -07:00
Branimir Karadžić 6e1d39b92a debugdraw: Cone & cylinder fill. 2016-06-14 22:33:37 -07:00
Branimir Karadžić eacd978cf1 Cleanup. 2016-06-05 21:36:58 -07:00
Branimir Karadžić e46135da8c Added ability to programmatically capture frame with RenderDoc. 2016-06-02 18:46:43 -07:00
Branimir Karadžić 21518f201f texturec: Preserve precision of input texture. 2016-06-02 16:38:26 -07:00
Branimir Karadžić 53e70f3424 Added 16-bit per channel PNG support. 2016-05-31 17:45:58 -07:00
Branimir Karadžić ddfb525931 Made old & new imgui cohabitate. 2016-05-28 20:52:18 -07:00