2011-02-21 06:58:46 +00:00
|
|
|
/*
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
|
|
|
|
*
|
2011-11-29 10:54:47 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
2011-11-29 10:54:47 +00:00
|
|
|
* of the License, or (at your option) any later version.
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
*
|
2011-11-29 10:54:47 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2011-11-29 10:54:47 +00:00
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
*
|
|
|
|
|
* The Original Code is Copyright (C) 2005 Blender Foundation.
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* The Original Code is: all of this file.
|
|
|
|
|
*
|
|
|
|
|
* Contributor(s): Brecht Van Lommel.
|
|
|
|
|
*
|
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
|
*/
|
|
|
|
|
|
2011-02-21 06:58:46 +00:00
|
|
|
/** \file GPU_material.h
|
|
|
|
|
* \ingroup gpu
|
|
|
|
|
*/
|
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#ifndef __GPU_MATERIAL_H__
|
|
|
|
|
#define __GPU_MATERIAL_H__
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
|
2015-01-24 13:25:49 +01:00
|
|
|
#include "DNA_customdata_types.h" /* for CustomDataType */
|
2011-09-09 11:55:38 +00:00
|
|
|
#include "DNA_listBase.h"
|
|
|
|
|
|
2014-10-07 15:46:19 -05:00
|
|
|
#include "BLI_sys_types.h" /* for bool */
|
|
|
|
|
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
struct Image;
|
|
|
|
|
struct ImageUser;
|
2017-07-14 17:40:54 +02:00
|
|
|
struct ListBase;
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
struct Material;
|
|
|
|
|
struct Object;
|
|
|
|
|
struct Scene;
|
|
|
|
|
struct GPUVertexAttribs;
|
|
|
|
|
struct GPUNode;
|
|
|
|
|
struct GPUNodeLink;
|
|
|
|
|
struct GPUNodeStack;
|
|
|
|
|
struct GPUMaterial;
|
|
|
|
|
struct GPUTexture;
|
2017-07-14 17:40:54 +02:00
|
|
|
struct GPUUniformBuffer;
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
struct GPULamp;
|
2013-01-22 11:18:41 +00:00
|
|
|
struct PreviewImage;
|
2014-11-24 17:18:56 +01:00
|
|
|
struct World;
|
2017-07-14 17:40:54 +02:00
|
|
|
struct bNode;
|
2017-04-27 22:27:09 +02:00
|
|
|
struct bNodeTree;
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
|
|
|
|
|
typedef struct GPUNode GPUNode;
|
|
|
|
|
typedef struct GPUNodeLink GPUNodeLink;
|
|
|
|
|
typedef struct GPUMaterial GPUMaterial;
|
2017-04-03 15:38:00 +02:00
|
|
|
|
2016-12-28 17:30:58 +01:00
|
|
|
typedef struct GPUParticleInfo GPUParticleInfo;
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
|
|
|
|
|
/* Functions to create GPU Materials nodes */
|
|
|
|
|
|
|
|
|
|
typedef enum GPUType {
|
2017-09-14 01:02:10 +02:00
|
|
|
/* Keep in sync with GPU_DATATYPE_STR */
|
2015-01-24 13:43:57 +01:00
|
|
|
/* The value indicates the number of elements in each type */
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
GPU_NONE = 0,
|
|
|
|
|
GPU_FLOAT = 1,
|
|
|
|
|
GPU_VEC2 = 2,
|
|
|
|
|
GPU_VEC3 = 3,
|
|
|
|
|
GPU_VEC4 = 4,
|
|
|
|
|
GPU_MAT3 = 9,
|
|
|
|
|
GPU_MAT4 = 16,
|
2015-01-24 13:43:57 +01:00
|
|
|
|
2017-09-14 01:02:10 +02:00
|
|
|
/* Values not in GPU_DATATYPE_STR */
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
GPU_TEX2D = 1002,
|
2017-10-27 22:35:48 +02:00
|
|
|
GPU_TEX3D = 1003,
|
|
|
|
|
GPU_SHADOW2D = 1004,
|
|
|
|
|
GPU_TEXCUBE = 1005,
|
2017-09-14 01:02:10 +02:00
|
|
|
|
|
|
|
|
/* GLSL Struct types */
|
2017-10-27 22:35:48 +02:00
|
|
|
GPU_CLOSURE = 1006,
|
2017-09-14 01:02:10 +02:00
|
|
|
|
|
|
|
|
/* Opengl Attributes */
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
GPU_ATTRIB = 3001
|
|
|
|
|
} GPUType;
|
|
|
|
|
|
|
|
|
|
typedef enum GPUBuiltin {
|
2015-02-02 14:25:44 +01:00
|
|
|
GPU_VIEW_MATRIX = (1 << 0),
|
|
|
|
|
GPU_OBJECT_MATRIX = (1 << 1),
|
|
|
|
|
GPU_INVERSE_VIEW_MATRIX = (1 << 2),
|
|
|
|
|
GPU_INVERSE_OBJECT_MATRIX = (1 << 3),
|
|
|
|
|
GPU_VIEW_POSITION = (1 << 4),
|
|
|
|
|
GPU_VIEW_NORMAL = (1 << 5),
|
|
|
|
|
GPU_OBCOLOR = (1 << 6),
|
|
|
|
|
GPU_AUTO_BUMPSCALE = (1 << 7),
|
2015-03-23 15:29:42 -04:00
|
|
|
GPU_CAMERA_TEXCO_FACTORS = (1 << 8),
|
2016-12-28 17:30:58 +01:00
|
|
|
GPU_PARTICLE_SCALAR_PROPS = (1 << 9),
|
|
|
|
|
GPU_PARTICLE_LOCATION = (1 << 10),
|
|
|
|
|
GPU_PARTICLE_VELOCITY = (1 << 11),
|
|
|
|
|
GPU_PARTICLE_ANG_VELOCITY = (1 << 12),
|
|
|
|
|
GPU_LOC_TO_VIEW_MATRIX = (1 << 13),
|
Vector Transform node support for GLSL mode and the internal renderer
The Vector Transform node is a useful node which is present in the Cycles renderer.
{F144283}
This patch implements the Vector Transform node for GLSL mode and the internal renderer.
Example: {F273060}
Alexander (Blend4Web Team)
Reviewers: brecht, campbellbarton, sergey
Reviewed By: campbellbarton, sergey
Subscribers: psy-fi, duarteframos, RobM, lightbwk, sergey, AlexKowel, valentin_b4w, Evgeny_Rodygin, yurikovelenov
Projects: #bf_blender:_next
Differential Revision: https://developer.blender.org/D909
2016-01-23 15:27:36 +03:00
|
|
|
GPU_INVERSE_LOC_TO_VIEW_MATRIX = (1 << 14),
|
2017-10-27 22:35:48 +02:00
|
|
|
GPU_OBJECT_INFO = (1 << 15),
|
|
|
|
|
GPU_VOLUME_DENSITY = (1 << 16),
|
2018-02-22 18:51:20 +01:00
|
|
|
GPU_VOLUME_FLAME = (1 << 17),
|
|
|
|
|
GPU_VOLUME_TEMPERATURE = (1 << 18)
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
} GPUBuiltin;
|
|
|
|
|
|
2014-04-02 15:07:45 +03:00
|
|
|
typedef enum GPUOpenGLBuiltin {
|
|
|
|
|
GPU_MATCAP_NORMAL = 1,
|
|
|
|
|
GPU_COLOR = 2,
|
|
|
|
|
} GPUOpenGLBuiltin;
|
|
|
|
|
|
2014-11-24 17:18:56 +01:00
|
|
|
typedef enum GPUMatType {
|
|
|
|
|
GPU_MATERIAL_TYPE_MESH = 1,
|
2015-02-02 14:25:44 +01:00
|
|
|
GPU_MATERIAL_TYPE_WORLD = 2,
|
2014-11-24 17:18:56 +01:00
|
|
|
} GPUMatType;
|
|
|
|
|
|
|
|
|
|
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
typedef enum GPUBlendMode {
|
|
|
|
|
GPU_BLEND_SOLID = 0,
|
|
|
|
|
GPU_BLEND_ADD = 1,
|
|
|
|
|
GPU_BLEND_ALPHA = 2,
|
TexFace to Material Settings big patch
Summary:
========
The idea here is to move the texface options into the material panel.
For images with the change please visit:
http://code.blender.org/index.php/2011/09/bge-material-texface-changes
1 - Some of the legacy problems 2.49 and 2.5x has with the texface system:
==========================================================================
1.1) Shadow, Bilboard and Halo are mutual exclusive (in the code), yet you can
select a face to be more than one mode.
1.2) Sort only works for blend Alpha yet it's an option regardless of the
Transparency Blend you pick.
1.3) Shared doesn't affect anything in BGE.
1.4) ObColor only works for Text objects (old bitmap texts) when using Texture
Face Materials. (not address yet, I so far ignored obcolor)
2 - Notes:
============
2.1) Now "Use Face Textures" in material Option panel will work in Multitexture
even if there is no texture channel.
2.2) In FaceTexture mode it will use TexFace all the time, even if you don't
check the "Use Texture Face" option in the UI. It's a matter of decision, since
the code for either way is there. I decided by the solution that makes the
creation of a material fast - in this mode the user doesn't need to mess with
textures or this "Use Texture Face" option at all. I'm not strong in my opinion
here. But I think if we don't have this then what is the point of the Texture
Face mode?
2.3) I kept references for tface only when we need the image, UV or the tiling
setting. It should help later when/if we split the Image and UV layers from the
tface struct (Campbell and Brecht proposal).
3 - Changes in a Nutshell:
==========================
3.1) "Texture Face" panel (in the Mesh/Object Data panel) no longer exists. Those settings are all part of the material properties, visible when Game Render is set.
3.2) "Texture Face" Shading mode (in the Render panel) is now called “Single Texture”, it needs a material for special settings (e.g. Billboard, Alpha Sort, …).
3.3) New options in the Material Panel
* Shadeless option in the Material panel is now supported for all three Shading modes.
* Physics is now toggleable, this is the old Collision option.
* Two Side (on) is now called Back Culling (off).
* Alpha Sort is one of the Alpha options, together (and mutually exclusive) to Alpha Blend, Alpha Clip, Add and Opaque (i.e. solid).
* Shadow, Billboard and Halo are grouped in the “Face Orientation” property.
* "Face Textures" and "Face Textures Alpha" (under Options) can be used for all but GLSL shading mode (to be supported in GLSL eventually).
* The backend in the game engine is still the same as before. The only changes are in the interface and in the way you need to think your materials. The bottomline is: It’s no longer possible to share materials between faces that do not share the same game properties.
4 - Acknowledgment:
==================
Mike Pan for the design discussions, and testing along the whole development process.
Vitor Balbio for the first hands-on code with the interface changes. That helped me a lot to push me into work on that.
Benoit Bolsee and Brecht van Lommel for patch review (* no one reviewed the whole patch, or the latest iteractions, so I still hold liability for any problems).
Blender artists that gave feedback and helped testing the patch.
Patch review and original documentation can be found here:
http://wiki.blender.org/index.php/User:Dfelinto/TexFace
http://codereview.appspot.com/4289041/
2011-09-19 19:55:59 +00:00
|
|
|
GPU_BLEND_CLIP = 4,
|
2015-07-03 19:03:29 +02:00
|
|
|
GPU_BLEND_ALPHA_SORT = 8,
|
|
|
|
|
GPU_BLEND_ALPHA_TO_COVERAGE = 16
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
} GPUBlendMode;
|
|
|
|
|
|
|
|
|
|
typedef struct GPUNodeStack {
|
|
|
|
|
GPUType type;
|
|
|
|
|
float vec[4];
|
|
|
|
|
struct GPUNodeLink *link;
|
2014-04-11 11:25:41 +10:00
|
|
|
bool hasinput;
|
|
|
|
|
bool hasoutput;
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
short sockettype;
|
2018-02-22 20:52:08 +01:00
|
|
|
bool end;
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
} GPUNodeStack;
|
|
|
|
|
|
2018-03-05 21:52:02 +01:00
|
|
|
typedef enum GPUMaterialStatus {
|
2018-03-05 00:54:31 +01:00
|
|
|
GPU_MAT_FAILED = 0,
|
|
|
|
|
GPU_MAT_QUEUED,
|
|
|
|
|
GPU_MAT_SUCCESS,
|
2018-03-05 21:52:02 +01:00
|
|
|
} GPUMaterialStatus;
|
2015-05-21 08:08:27 +10:00
|
|
|
|
|
|
|
|
#define GPU_DYNAMIC_GROUP_FROM_TYPE(f) ((f) & 0xFFFF0000)
|
|
|
|
|
|
|
|
|
|
#define GPU_DYNAMIC_GROUP_MISC 0x00010000
|
|
|
|
|
#define GPU_DYNAMIC_GROUP_LAMP 0x00020000
|
|
|
|
|
#define GPU_DYNAMIC_GROUP_OBJECT 0x00030000
|
|
|
|
|
#define GPU_DYNAMIC_GROUP_SAMPLER 0x00040000
|
|
|
|
|
#define GPU_DYNAMIC_GROUP_MIST 0x00050000
|
|
|
|
|
#define GPU_DYNAMIC_GROUP_WORLD 0x00060000
|
|
|
|
|
#define GPU_DYNAMIC_GROUP_MAT 0x00070000
|
2017-07-14 17:40:54 +02:00
|
|
|
#define GPU_DYNAMIC_UBO 0x00080000
|
2015-05-21 08:08:27 +10:00
|
|
|
|
2015-01-24 15:50:03 +01:00
|
|
|
typedef enum GPUDynamicType {
|
2015-05-21 08:08:27 +10:00
|
|
|
|
|
|
|
|
GPU_DYNAMIC_NONE = 0,
|
|
|
|
|
|
|
|
|
|
GPU_DYNAMIC_OBJECT_VIEWMAT = 1 | GPU_DYNAMIC_GROUP_OBJECT,
|
|
|
|
|
GPU_DYNAMIC_OBJECT_MAT = 2 | GPU_DYNAMIC_GROUP_OBJECT,
|
|
|
|
|
GPU_DYNAMIC_OBJECT_VIEWIMAT = 3 | GPU_DYNAMIC_GROUP_OBJECT,
|
|
|
|
|
GPU_DYNAMIC_OBJECT_IMAT = 4 | GPU_DYNAMIC_GROUP_OBJECT,
|
|
|
|
|
GPU_DYNAMIC_OBJECT_COLOR = 5 | GPU_DYNAMIC_GROUP_OBJECT,
|
|
|
|
|
GPU_DYNAMIC_OBJECT_AUTOBUMPSCALE = 6 | GPU_DYNAMIC_GROUP_OBJECT,
|
Vector Transform node support for GLSL mode and the internal renderer
The Vector Transform node is a useful node which is present in the Cycles renderer.
{F144283}
This patch implements the Vector Transform node for GLSL mode and the internal renderer.
Example: {F273060}
Alexander (Blend4Web Team)
Reviewers: brecht, campbellbarton, sergey
Reviewed By: campbellbarton, sergey
Subscribers: psy-fi, duarteframos, RobM, lightbwk, sergey, AlexKowel, valentin_b4w, Evgeny_Rodygin, yurikovelenov
Projects: #bf_blender:_next
Differential Revision: https://developer.blender.org/D909
2016-01-23 15:27:36 +03:00
|
|
|
GPU_DYNAMIC_OBJECT_LOCTOVIEWMAT = 7 | GPU_DYNAMIC_GROUP_OBJECT,
|
|
|
|
|
GPU_DYNAMIC_OBJECT_LOCTOVIEWIMAT = 8 | GPU_DYNAMIC_GROUP_OBJECT,
|
2015-05-21 08:08:27 +10:00
|
|
|
|
|
|
|
|
GPU_DYNAMIC_LAMP_DYNVEC = 1 | GPU_DYNAMIC_GROUP_LAMP,
|
|
|
|
|
GPU_DYNAMIC_LAMP_DYNCO = 2 | GPU_DYNAMIC_GROUP_LAMP,
|
|
|
|
|
GPU_DYNAMIC_LAMP_DYNIMAT = 3 | GPU_DYNAMIC_GROUP_LAMP,
|
|
|
|
|
GPU_DYNAMIC_LAMP_DYNPERSMAT = 4 | GPU_DYNAMIC_GROUP_LAMP,
|
|
|
|
|
GPU_DYNAMIC_LAMP_DYNENERGY = 5 | GPU_DYNAMIC_GROUP_LAMP,
|
|
|
|
|
GPU_DYNAMIC_LAMP_DYNCOL = 6 | GPU_DYNAMIC_GROUP_LAMP,
|
|
|
|
|
GPU_DYNAMIC_LAMP_DISTANCE = 7 | GPU_DYNAMIC_GROUP_LAMP,
|
|
|
|
|
GPU_DYNAMIC_LAMP_ATT1 = 8 | GPU_DYNAMIC_GROUP_LAMP,
|
|
|
|
|
GPU_DYNAMIC_LAMP_ATT2 = 9 | GPU_DYNAMIC_GROUP_LAMP,
|
|
|
|
|
GPU_DYNAMIC_LAMP_SPOTSIZE = 10 | GPU_DYNAMIC_GROUP_LAMP,
|
|
|
|
|
GPU_DYNAMIC_LAMP_SPOTBLEND = 11 | GPU_DYNAMIC_GROUP_LAMP,
|
2015-10-15 22:36:31 +11:00
|
|
|
GPU_DYNAMIC_LAMP_SPOTSCALE = 12 | GPU_DYNAMIC_GROUP_LAMP,
|
2016-03-13 02:00:12 +01:00
|
|
|
GPU_DYNAMIC_LAMP_COEFFCONST = 13 | GPU_DYNAMIC_GROUP_LAMP,
|
|
|
|
|
GPU_DYNAMIC_LAMP_COEFFLIN = 14 | GPU_DYNAMIC_GROUP_LAMP,
|
|
|
|
|
GPU_DYNAMIC_LAMP_COEFFQUAD = 15 | GPU_DYNAMIC_GROUP_LAMP,
|
2015-05-21 08:08:27 +10:00
|
|
|
|
|
|
|
|
GPU_DYNAMIC_SAMPLER_2DBUFFER = 1 | GPU_DYNAMIC_GROUP_SAMPLER,
|
|
|
|
|
GPU_DYNAMIC_SAMPLER_2DIMAGE = 2 | GPU_DYNAMIC_GROUP_SAMPLER,
|
|
|
|
|
GPU_DYNAMIC_SAMPLER_2DSHADOW = 3 | GPU_DYNAMIC_GROUP_SAMPLER,
|
|
|
|
|
|
|
|
|
|
GPU_DYNAMIC_MIST_ENABLE = 1 | GPU_DYNAMIC_GROUP_MIST,
|
|
|
|
|
GPU_DYNAMIC_MIST_START = 2 | GPU_DYNAMIC_GROUP_MIST,
|
|
|
|
|
GPU_DYNAMIC_MIST_DISTANCE = 3 | GPU_DYNAMIC_GROUP_MIST,
|
|
|
|
|
GPU_DYNAMIC_MIST_INTENSITY = 4 | GPU_DYNAMIC_GROUP_MIST,
|
|
|
|
|
GPU_DYNAMIC_MIST_TYPE = 5 | GPU_DYNAMIC_GROUP_MIST,
|
|
|
|
|
GPU_DYNAMIC_MIST_COLOR = 6 | GPU_DYNAMIC_GROUP_MIST,
|
|
|
|
|
|
|
|
|
|
GPU_DYNAMIC_HORIZON_COLOR = 1 | GPU_DYNAMIC_GROUP_WORLD,
|
|
|
|
|
GPU_DYNAMIC_AMBIENT_COLOR = 2 | GPU_DYNAMIC_GROUP_WORLD,
|
World textures displaying for viewport in BI.
This patch supports "Image or Movie" and "Environment map" types of world texture for the viewport.
It supports:
- "View", "AngMap" and "Equirectangular" types of mapping.
- Different types of texture blending (according to BI world render).
- Same color blending as when it lacked textures (but render via glsl).
{F207734}
{F207735}
Example: {F275180}
Original author: @valentin_b4w
Regards,
Alexander (Blend4Web Team).
Reviewers: sergey, valentin_b4w, brecht, merwin
Reviewed By: merwin
Subscribers: campbellbarton, merwin, blueprintrandom, youle, a.romanov, yurikovelenov, AlexKowel, Evgeny_Rodygin
Projects: #rendering, #opengl_gfx, #bf_blender:_next
Differential Revision: https://developer.blender.org/D1414
2016-01-27 12:06:57 +03:00
|
|
|
GPU_DYNAMIC_ZENITH_COLOR = 3 | GPU_DYNAMIC_GROUP_WORLD,
|
2015-05-21 08:08:27 +10:00
|
|
|
|
|
|
|
|
GPU_DYNAMIC_MAT_DIFFRGB = 1 | GPU_DYNAMIC_GROUP_MAT,
|
|
|
|
|
GPU_DYNAMIC_MAT_REF = 2 | GPU_DYNAMIC_GROUP_MAT,
|
|
|
|
|
GPU_DYNAMIC_MAT_SPECRGB = 3 | GPU_DYNAMIC_GROUP_MAT,
|
|
|
|
|
GPU_DYNAMIC_MAT_SPEC = 4 | GPU_DYNAMIC_GROUP_MAT,
|
|
|
|
|
GPU_DYNAMIC_MAT_HARD = 5 | GPU_DYNAMIC_GROUP_MAT,
|
|
|
|
|
GPU_DYNAMIC_MAT_EMIT = 6 | GPU_DYNAMIC_GROUP_MAT,
|
|
|
|
|
GPU_DYNAMIC_MAT_AMB = 7 | GPU_DYNAMIC_GROUP_MAT,
|
2016-03-21 14:36:33 +03:00
|
|
|
GPU_DYNAMIC_MAT_ALPHA = 8 | GPU_DYNAMIC_GROUP_MAT,
|
|
|
|
|
GPU_DYNAMIC_MAT_MIR = 9 | GPU_DYNAMIC_GROUP_MAT
|
2015-01-24 15:50:03 +01:00
|
|
|
} GPUDynamicType;
|
|
|
|
|
|
2015-01-24 13:25:49 +01:00
|
|
|
GPUNodeLink *GPU_attribute(CustomDataType type, const char *name);
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
GPUNodeLink *GPU_uniform(float *num);
|
2015-01-24 15:50:03 +01:00
|
|
|
GPUNodeLink *GPU_dynamic_uniform(float *num, GPUDynamicType dynamictype, void *data);
|
2017-07-14 17:40:54 +02:00
|
|
|
GPUNodeLink *GPU_uniform_buffer(float *num, GPUType gputype);
|
2014-04-01 11:34:00 +11:00
|
|
|
GPUNodeLink *GPU_image(struct Image *ima, struct ImageUser *iuser, bool is_data);
|
World textures displaying for viewport in BI.
This patch supports "Image or Movie" and "Environment map" types of world texture for the viewport.
It supports:
- "View", "AngMap" and "Equirectangular" types of mapping.
- Different types of texture blending (according to BI world render).
- Same color blending as when it lacked textures (but render via glsl).
{F207734}
{F207735}
Example: {F275180}
Original author: @valentin_b4w
Regards,
Alexander (Blend4Web Team).
Reviewers: sergey, valentin_b4w, brecht, merwin
Reviewed By: merwin
Subscribers: campbellbarton, merwin, blueprintrandom, youle, a.romanov, yurikovelenov, AlexKowel, Evgeny_Rodygin
Projects: #rendering, #opengl_gfx, #bf_blender:_next
Differential Revision: https://developer.blender.org/D1414
2016-01-27 12:06:57 +03:00
|
|
|
GPUNodeLink *GPU_cube_map(struct Image *ima, struct ImageUser *iuser, bool is_data);
|
2013-01-22 11:18:41 +00:00
|
|
|
GPUNodeLink *GPU_image_preview(struct PreviewImage *prv);
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
GPUNodeLink *GPU_texture(int size, float *pixels);
|
2015-01-24 15:50:03 +01:00
|
|
|
GPUNodeLink *GPU_dynamic_texture(struct GPUTexture *tex, GPUDynamicType dynamictype, void *data);
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
GPUNodeLink *GPU_builtin(GPUBuiltin builtin);
|
2014-04-02 15:07:45 +03:00
|
|
|
GPUNodeLink *GPU_opengl_builtin(GPUOpenGLBuiltin builtin);
|
2015-07-14 18:48:54 +02:00
|
|
|
void GPU_node_link_set_type(GPUNodeLink *link, GPUType type);
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
|
2014-02-03 18:55:59 +11:00
|
|
|
bool GPU_link(GPUMaterial *mat, const char *name, ...);
|
2017-07-14 17:40:54 +02:00
|
|
|
bool GPU_stack_link(GPUMaterial *mat, struct bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out, ...);
|
|
|
|
|
GPUNodeLink *GPU_uniformbuffer_link_out(
|
|
|
|
|
struct GPUMaterial *mat, struct bNode *node,
|
|
|
|
|
struct GPUNodeStack *stack, const int index);
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
|
|
|
|
|
void GPU_material_output_link(GPUMaterial *material, GPUNodeLink *link);
|
2017-04-14 18:13:44 +03:00
|
|
|
GPUBuiltin GPU_get_material_builtins(GPUMaterial *material);
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
|
2017-11-22 04:51:21 +01:00
|
|
|
void GPU_material_sss_profile_create(GPUMaterial *material, float *radii, short *falloff_type, float *sharpness);
|
|
|
|
|
struct GPUUniformBuffer *GPU_material_sss_profile_get(
|
|
|
|
|
GPUMaterial *material, int sample_ct, struct GPUTexture **tex_profile);
|
2017-11-14 00:49:54 +01:00
|
|
|
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
/* High level functions to create and use GPU materials */
|
2017-06-28 10:50:33 +10:00
|
|
|
GPUMaterial *GPU_material_from_nodetree_find(
|
|
|
|
|
struct ListBase *gpumaterials, const void *engine_type, int options);
|
2017-04-27 22:27:09 +02:00
|
|
|
GPUMaterial *GPU_material_from_nodetree(
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
struct Scene *scene, struct bNodeTree *ntree, struct ListBase *gpumaterials, const void *engine_type, int options);
|
2018-03-05 00:54:31 +01:00
|
|
|
void GPU_material_generate_pass(
|
2018-04-21 20:42:27 +02:00
|
|
|
GPUMaterial *mat, const char *vert_code, const char *geom_code, const char *frag_lib, const char *defines);
|
2014-11-24 17:18:56 +01:00
|
|
|
void GPU_material_free(struct ListBase *gpumaterial);
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
|
2010-12-03 12:30:59 +00:00
|
|
|
void GPU_materials_free(void);
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
|
2013-11-25 20:58:23 +09:00
|
|
|
struct Scene *GPU_material_scene(GPUMaterial *material);
|
2014-11-24 17:18:56 +01:00
|
|
|
GPUMatType GPU_Material_get_type(GPUMaterial *material);
|
2017-04-27 22:27:09 +02:00
|
|
|
struct GPUPass *GPU_material_get_pass(GPUMaterial *material);
|
2018-03-11 23:43:09 +01:00
|
|
|
struct ListBase *GPU_material_get_inputs(GPUMaterial *material);
|
2018-03-05 21:52:02 +01:00
|
|
|
GPUMaterialStatus GPU_material_status(GPUMaterial *mat);
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
|
2017-07-14 17:40:54 +02:00
|
|
|
struct GPUUniformBuffer *GPU_material_get_uniform_buffer(GPUMaterial *material);
|
|
|
|
|
void GPU_material_create_uniform_buffer(GPUMaterial *material, struct ListBase *inputs);
|
|
|
|
|
void GPU_material_uniform_buffer_tag_dirty(struct ListBase *gpumaterials);
|
|
|
|
|
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
void GPU_material_vertex_attributes(GPUMaterial *material,
|
|
|
|
|
struct GPUVertexAttribs *attrib);
|
|
|
|
|
|
2014-04-01 11:34:00 +11:00
|
|
|
bool GPU_material_do_color_management(GPUMaterial *mat);
|
2017-10-27 16:07:44 +02:00
|
|
|
bool GPU_material_use_domain_surface(GPUMaterial *mat);
|
|
|
|
|
bool GPU_material_use_domain_volume(GPUMaterial *mat);
|
2012-09-09 11:04:49 +00:00
|
|
|
|
2018-03-11 23:43:09 +01:00
|
|
|
void GPU_pass_cache_garbage_collect(void);
|
|
|
|
|
void GPU_pass_cache_free(void);
|
|
|
|
|
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#endif /*__GPU_MATERIAL_H__*/
|